
// this is autogenerated file, do not edit it.
#include "ficus/ficus.h"

struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t;

static void _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t** dst);

struct _fx_N13Ast__binary_t_data_t;

static void _fx_free_N13Ast__binary_t(struct _fx_N13Ast__binary_t_data_t** dst);

struct _fx_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t;

static void _fx_free_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t(
   struct _fx_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t** dst);

struct _fx_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t_data_t;

static void _fx_free_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t(
   struct _fx_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t_data_t** dst);

struct _fx_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t;

static void _fx_free_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t(
   struct _fx_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t** dst);

struct _fx_Nt6option1FPN14K_form__atom_t3N14K_form__atom_tR10Ast__loc_tR17K_form__k_callb_t_data_t;

static void _fx_free_Nt6option1FPN14K_form__atom_t3N14K_form__atom_tR10Ast__loc_tR17K_form__k_callb_t(
   struct _fx_Nt6option1FPN14K_form__atom_t3N14K_form__atom_tR10Ast__loc_tR17K_form__k_callb_t_data_t** dst);

struct _fx_Nt6option1FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t_data_t;

static void _fx_free_Nt6option1FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t(
   struct _fx_Nt6option1FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t_data_t** dst);

struct _fx_Nt6option1FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t_data_t;

static void _fx_free_Nt6option1FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t(
   struct _fx_Nt6option1FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t_data_t** dst);

struct _fx_N14K_form__ktyp_t_data_t;

static void _fx_free_N14K_form__ktyp_t(struct _fx_N14K_form__ktyp_t_data_t** dst);

struct _fx_N14K_form__kexp_t_data_t;

static void _fx_free_N14K_form__kexp_t(struct _fx_N14K_form__kexp_t_data_t** dst);

struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t;

static void _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t** dst);

typedef struct _fx_Ta2i {
   int_ t0;
   int_ t1;
} _fx_Ta2i;

typedef struct _fx_T2Ta2iS {
   struct _fx_Ta2i t0;
   fx_str_t t1;
} _fx_T2Ta2iS;

typedef struct _fx_R9Ast__id_t {
   int_ m;
   int_ i;
   int_ j;
} _fx_R9Ast__id_t;

typedef struct _fx_R10Ast__loc_t {
   int_ m_idx;
   int_ line0;
   int_ col0;
   int_ line1;
   int_ col1;
} _fx_R10Ast__loc_t;

typedef struct _fx_T2Bi {
   bool t0;
   int_ t1;
} _fx_T2Bi;

typedef struct _fx_N12Ast__scope_t {
   int tag;
   union {
      int_ ScBlock;
      struct _fx_T2Bi ScLoop;
      int_ ScFold;
      int_ ScArrMap;
      int_ ScMap;
      int_ ScTry;
      struct _fx_R9Ast__id_t ScFun;
      struct _fx_R9Ast__id_t ScClass;
      struct _fx_R9Ast__id_t ScInterface;
      int_ ScModule;
   } u;
} _fx_N12Ast__scope_t;

typedef struct _fx_LN12Ast__scope_t_data_t {
   int_ rc;
   struct _fx_LN12Ast__scope_t_data_t* tl;
   struct _fx_N12Ast__scope_t hd;
} _fx_LN12Ast__scope_t_data_t, *_fx_LN12Ast__scope_t;

typedef struct _fx_N17Ast__fun_constr_t {
   int tag;
   union {
      int_ CtorVariant;
      struct _fx_R9Ast__id_t CtorFP;
      struct _fx_R9Ast__id_t CtorExn;
   } u;
} _fx_N17Ast__fun_constr_t;

typedef struct _fx_R16Ast__fun_flags_t {
   int_ fun_flag_pure;
   bool fun_flag_ccode;
   bool fun_flag_have_keywords;
   bool fun_flag_inline;
   bool fun_flag_nothrow;
   bool fun_flag_really_nothrow;
   bool fun_flag_private;
   struct _fx_N17Ast__fun_constr_t fun_flag_ctor;
   struct _fx_R9Ast__id_t fun_flag_method_of;
   bool fun_flag_uses_fv;
   bool fun_flag_recursive;
   bool fun_flag_instance;
} _fx_R16Ast__fun_flags_t;

typedef struct _fx_LR9Ast__id_t_data_t {
   int_ rc;
   struct _fx_LR9Ast__id_t_data_t* tl;
   struct _fx_R9Ast__id_t hd;
} _fx_LR9Ast__id_t_data_t, *_fx_LR9Ast__id_t;

typedef struct _fx_T2R9Ast__id_ti {
   struct _fx_R9Ast__id_t t0;
   int_ t1;
} _fx_T2R9Ast__id_ti;

typedef struct _fx_R16Ast__val_flags_t {
   bool val_flag_arg;
   bool val_flag_mutable;
   bool val_flag_temp;
   bool val_flag_tempref;
   bool val_flag_private;
   bool val_flag_subarray;
   bool val_flag_instance;
   struct _fx_T2R9Ast__id_ti val_flag_method;
   int_ val_flag_ctor;
   struct _fx_LN12Ast__scope_t_data_t* val_flag_global;
} _fx_R16Ast__val_flags_t;

typedef struct _fx_T2R9Ast__id_tN14K_form__ktyp_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N14K_form__ktyp_t_data_t* t1;
} _fx_T2R9Ast__id_tN14K_form__ktyp_t;

typedef struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t {
   int_ rc;
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* tl;
   struct _fx_T2R9Ast__id_tN14K_form__ktyp_t hd;
} _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t, *_fx_LT2R9Ast__id_tN14K_form__ktyp_t;

typedef struct _fx_R23K_form__kdefinterface_t {
   struct _fx_R9Ast__id_t ki_name;
   struct _fx_R9Ast__id_t ki_base;
   fx_str_t ki_cname;
   struct _fx_R9Ast__id_t ki_id;
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* ki_all_methods;
   struct _fx_LN12Ast__scope_t_data_t* ki_scope;
   struct _fx_R10Ast__loc_t ki_loc;
} _fx_R23K_form__kdefinterface_t;

typedef struct _fx_rR23K_form__kdefinterface_t_data_t {
   int_ rc;
   struct _fx_R23K_form__kdefinterface_t data;
} _fx_rR23K_form__kdefinterface_t_data_t, *_fx_rR23K_form__kdefinterface_t;

typedef struct _fx_R25K_form__kdefclosureinfo_t {
   struct _fx_R9Ast__id_t kci_arg;
   struct _fx_R9Ast__id_t kci_fcv_t;
   struct _fx_R9Ast__id_t kci_fp_typ;
   struct _fx_R9Ast__id_t kci_make_fp;
   struct _fx_R9Ast__id_t kci_wrap_f;
} _fx_R25K_form__kdefclosureinfo_t;

typedef struct _fx_R17K_form__kdeffun_t {
   struct _fx_R9Ast__id_t kf_name;
   fx_str_t kf_cname;
   struct _fx_LR9Ast__id_t_data_t* kf_params;
   struct _fx_N14K_form__ktyp_t_data_t* kf_rt;
   struct _fx_N14K_form__kexp_t_data_t* kf_body;
   struct _fx_R16Ast__fun_flags_t kf_flags;
   struct _fx_R25K_form__kdefclosureinfo_t kf_closure;
   struct _fx_LN12Ast__scope_t_data_t* kf_scope;
   struct _fx_R10Ast__loc_t kf_loc;
} _fx_R17K_form__kdeffun_t;

typedef struct _fx_rR17K_form__kdeffun_t_data_t {
   int_ rc;
   struct _fx_R17K_form__kdeffun_t data;
} _fx_rR17K_form__kdeffun_t_data_t, *_fx_rR17K_form__kdeffun_t;

typedef struct _fx_R17K_form__kdefexn_t {
   struct _fx_R9Ast__id_t ke_name;
   fx_str_t ke_cname;
   fx_str_t ke_base_cname;
   struct _fx_N14K_form__ktyp_t_data_t* ke_typ;
   bool ke_std;
   struct _fx_R9Ast__id_t ke_tag;
   struct _fx_R9Ast__id_t ke_make;
   struct _fx_LN12Ast__scope_t_data_t* ke_scope;
   struct _fx_R10Ast__loc_t ke_loc;
} _fx_R17K_form__kdefexn_t;

typedef struct _fx_rR17K_form__kdefexn_t_data_t {
   int_ rc;
   struct _fx_R17K_form__kdefexn_t data;
} _fx_rR17K_form__kdefexn_t_data_t, *_fx_rR17K_form__kdefexn_t;

typedef struct _fx_R17K_form__ktprops_t {
   bool ktp_complex;
   bool ktp_scalar;
   bool ktp_ptr;
   bool ktp_pass_by_ref;
   bool ktp_custom_free;
   bool ktp_custom_copy;
} _fx_R17K_form__ktprops_t;

typedef struct _fx_Nt6option1R17K_form__ktprops_t {
   int tag;
   union {
      struct _fx_R17K_form__ktprops_t Some;
   } u;
} _fx_Nt6option1R17K_form__ktprops_t;

typedef struct _fx_R16Ast__var_flags_t {
   int_ var_flag_class_from;
   bool var_flag_record;
   bool var_flag_recursive;
   bool var_flag_have_tag;
   bool var_flag_have_mutable;
   bool var_flag_opt;
   bool var_flag_instance;
} _fx_R16Ast__var_flags_t;

typedef struct _fx_LN14K_form__ktyp_t_data_t {
   int_ rc;
   struct _fx_LN14K_form__ktyp_t_data_t* tl;
   struct _fx_N14K_form__ktyp_t_data_t* hd;
} _fx_LN14K_form__ktyp_t_data_t, *_fx_LN14K_form__ktyp_t;

typedef struct _fx_T2R9Ast__id_tLR9Ast__id_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_LR9Ast__id_t_data_t* t1;
} _fx_T2R9Ast__id_tLR9Ast__id_t;

typedef struct _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t {
   int_ rc;
   struct _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t* tl;
   struct _fx_T2R9Ast__id_tLR9Ast__id_t hd;
} _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t, *_fx_LT2R9Ast__id_tLR9Ast__id_t;

typedef struct _fx_R21K_form__kdefvariant_t {
   struct _fx_R9Ast__id_t kvar_name;
   fx_str_t kvar_cname;
   struct _fx_R9Ast__id_t kvar_proto;
   struct _fx_Nt6option1R17K_form__ktprops_t kvar_props;
   struct _fx_LN14K_form__ktyp_t_data_t* kvar_targs;
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* kvar_cases;
   struct _fx_LR9Ast__id_t_data_t* kvar_ctors;
   struct _fx_R16Ast__var_flags_t kvar_flags;
   struct _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t* kvar_ifaces;
   struct _fx_LN12Ast__scope_t_data_t* kvar_scope;
   struct _fx_R10Ast__loc_t kvar_loc;
} _fx_R21K_form__kdefvariant_t;

typedef struct _fx_rR21K_form__kdefvariant_t_data_t {
   int_ rc;
   struct _fx_R21K_form__kdefvariant_t data;
} _fx_rR21K_form__kdefvariant_t_data_t, *_fx_rR21K_form__kdefvariant_t;

typedef struct _fx_R17K_form__kdeftyp_t {
   struct _fx_R9Ast__id_t kt_name;
   fx_str_t kt_cname;
   struct _fx_R9Ast__id_t kt_proto;
   struct _fx_Nt6option1R17K_form__ktprops_t kt_props;
   struct _fx_LN14K_form__ktyp_t_data_t* kt_targs;
   struct _fx_N14K_form__ktyp_t_data_t* kt_typ;
   struct _fx_LN12Ast__scope_t_data_t* kt_scope;
   struct _fx_R10Ast__loc_t kt_loc;
} _fx_R17K_form__kdeftyp_t;

typedef struct _fx_rR17K_form__kdeftyp_t_data_t {
   int_ rc;
   struct _fx_R17K_form__kdeftyp_t data;
} _fx_rR17K_form__kdeftyp_t_data_t, *_fx_rR17K_form__kdeftyp_t;

typedef struct _fx_R25K_form__kdefclosurevars_t {
   struct _fx_R9Ast__id_t kcv_name;
   fx_str_t kcv_cname;
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* kcv_freevars;
   struct _fx_LR9Ast__id_t_data_t* kcv_orig_freevars;
   struct _fx_LN12Ast__scope_t_data_t* kcv_scope;
   struct _fx_R10Ast__loc_t kcv_loc;
} _fx_R25K_form__kdefclosurevars_t;

typedef struct _fx_rR25K_form__kdefclosurevars_t_data_t {
   int_ rc;
   struct _fx_R25K_form__kdefclosurevars_t data;
} _fx_rR25K_form__kdefclosurevars_t_data_t, *_fx_rR25K_form__kdefclosurevars_t;

typedef struct _fx_N12Map__color_t {
   int tag;
} _fx_N12Map__color_t;

typedef struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t {
   struct _fx_N12Map__color_t t0;
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t* t1;
   struct _fx_R9Ast__id_t t2;
   struct _fx_R9Ast__id_t t3;
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t* t4;
} _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t;

typedef struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t {
   int_ rc;
   union {
      struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t
         Node;
   } u;
} _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t, *_fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t;

typedef struct _fx_T2R10Ast__loc_tS {
   struct _fx_R10Ast__loc_t t0;
   fx_str_t t1;
} _fx_T2R10Ast__loc_tS;

typedef struct _fx_N12Ast__cmpop_t {
   int tag;
} _fx_N12Ast__cmpop_t;

typedef struct _fx_N13Ast__binary_t_data_t {
   int_ rc;
   int tag;
   union {
      struct _fx_N12Ast__cmpop_t OpCmp;
      struct _fx_N12Ast__cmpop_t OpDotCmp;
      struct _fx_N13Ast__binary_t_data_t* OpAugBinary;
   } u;
} _fx_N13Ast__binary_t_data_t, *_fx_N13Ast__binary_t;

typedef struct _fx_T2SR10Ast__loc_t {
   fx_str_t t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2SR10Ast__loc_t;

typedef struct _fx_LT2SR10Ast__loc_t_data_t {
   int_ rc;
   struct _fx_LT2SR10Ast__loc_t_data_t* tl;
   struct _fx_T2SR10Ast__loc_t hd;
} _fx_LT2SR10Ast__loc_t_data_t, *_fx_LT2SR10Ast__loc_t;

typedef struct _fx_Li_data_t {
   int_ rc;
   struct _fx_Li_data_t* tl;
   int_ hd;
} _fx_Li_data_t, *_fx_Li;

typedef struct _fx_Nt6option1N14K_form__kexp_t {
   int tag;
   union {
      struct _fx_N14K_form__kexp_t_data_t* Some;
   } u;
} _fx_Nt6option1N14K_form__kexp_t;

typedef struct _fx_T2il {
   int_ t0;
   int64_t t1;
} _fx_T2il;

typedef struct _fx_T2iq {
   int_ t0;
   uint64_t t1;
} _fx_T2iq;

typedef struct _fx_T2id {
   int_ t0;
   double t1;
} _fx_T2id;

typedef struct _fx_N14K_form__klit_t {
   int tag;
   union {
      int64_t KLitInt;
      struct _fx_T2il KLitSInt;
      struct _fx_T2iq KLitUInt;
      struct _fx_T2id KLitFloat;
      fx_str_t KLitString;
      char_ KLitChar;
      bool KLitBool;
      struct _fx_N14K_form__ktyp_t_data_t* KLitNil;
   } u;
} _fx_N14K_form__klit_t;

typedef struct _fx_N14K_form__atom_t {
   int tag;
   union {
      struct _fx_R9Ast__id_t AtomId;
      struct _fx_N14K_form__klit_t AtomLit;
   } u;
} _fx_N14K_form__atom_t;

typedef struct _fx_R22K_form__k_fold_callb_t {
   struct _fx_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t* kcb_fold_ktyp;
   struct _fx_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t_data_t* kcb_fold_kexp;
   struct _fx_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t* kcb_fold_atom;
} _fx_R22K_form__k_fold_callb_t;

typedef struct _fx_FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t {
   int (*fp)(struct _fx_N14K_form__atom_t*, struct _fx_R10Ast__loc_t*, struct _fx_R22K_form__k_fold_callb_t*, void*);
   fx_fcv_t* fcv;
} _fx_FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t;

typedef struct _fx_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t {
   int_ rc;
   union {
      struct _fx_FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t Some;
   } u;
} _fx_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t, *_fx_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t;

typedef struct _fx_FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t {
   int (*fp)(struct _fx_N14K_form__kexp_t_data_t*, struct _fx_R22K_form__k_fold_callb_t*, void*);
   fx_fcv_t* fcv;
} _fx_FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t;

typedef struct _fx_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t_data_t {
   int_ rc;
   union {
      struct _fx_FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t Some;
   } u;
} _fx_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t_data_t, *_fx_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t;

typedef struct _fx_FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t {
   int (*fp)(struct _fx_N14K_form__ktyp_t_data_t*, struct _fx_R10Ast__loc_t*, struct _fx_R22K_form__k_fold_callb_t*, void*);
   fx_fcv_t* fcv;
} _fx_FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t;

typedef struct _fx_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t {
   int_ rc;
   union {
      struct _fx_FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t Some;
   } u;
} _fx_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t, *_fx_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t;

typedef struct _fx_R17K_form__k_callb_t {
   struct _fx_Nt6option1FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t_data_t* kcb_ktyp;
   struct _fx_Nt6option1FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t_data_t* kcb_kexp;
   struct _fx_Nt6option1FPN14K_form__atom_t3N14K_form__atom_tR10Ast__loc_tR17K_form__k_callb_t_data_t* kcb_atom;
} _fx_R17K_form__k_callb_t;

typedef struct _fx_FPN14K_form__atom_t3N14K_form__atom_tR10Ast__loc_tR17K_form__k_callb_t {
   int (*fp)(
      struct _fx_N14K_form__atom_t*, struct _fx_R10Ast__loc_t*, struct _fx_R17K_form__k_callb_t*, struct _fx_N14K_form__atom_t*,
         void*);
   fx_fcv_t* fcv;
} _fx_FPN14K_form__atom_t3N14K_form__atom_tR10Ast__loc_tR17K_form__k_callb_t;

typedef struct _fx_Nt6option1FPN14K_form__atom_t3N14K_form__atom_tR10Ast__loc_tR17K_form__k_callb_t_data_t {
   int_ rc;
   union {
      struct _fx_FPN14K_form__atom_t3N14K_form__atom_tR10Ast__loc_tR17K_form__k_callb_t Some;
   } u;
} _fx_Nt6option1FPN14K_form__atom_t3N14K_form__atom_tR10Ast__loc_tR17K_form__k_callb_t_data_t, *_fx_Nt6option1FPN14K_form__atom_t3N14K_form__atom_tR10Ast__loc_tR17K_form__k_callb_t;

typedef struct _fx_FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t {
   int (*fp)(
      struct _fx_N14K_form__kexp_t_data_t*, struct _fx_R17K_form__k_callb_t*, struct _fx_N14K_form__kexp_t_data_t**, void*);
   fx_fcv_t* fcv;
} _fx_FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t;

typedef struct _fx_Nt6option1FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t_data_t {
   int_ rc;
   union {
      struct _fx_FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t Some;
   } u;
} _fx_Nt6option1FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t_data_t, *_fx_Nt6option1FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t;

typedef struct _fx_FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t {
   int (*fp)(
      struct _fx_N14K_form__ktyp_t_data_t*, struct _fx_R10Ast__loc_t*, struct _fx_R17K_form__k_callb_t*,
         struct _fx_N14K_form__ktyp_t_data_t**, void*);
   fx_fcv_t* fcv;
} _fx_FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t;

typedef struct _fx_Nt6option1FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t_data_t {
   int_ rc;
   union {
      struct _fx_FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t Some;
   } u;
} _fx_Nt6option1FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t_data_t, *_fx_Nt6option1FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t;

typedef struct _fx_Nt6option1N14K_form__atom_t {
   int tag;
   union {
      struct _fx_N14K_form__atom_t Some;
   } u;
} _fx_Nt6option1N14K_form__atom_t;

typedef struct _fx_LN14K_form__kexp_t_data_t {
   int_ rc;
   struct _fx_LN14K_form__kexp_t_data_t* tl;
   struct _fx_N14K_form__kexp_t_data_t* hd;
} _fx_LN14K_form__kexp_t_data_t, *_fx_LN14K_form__kexp_t;

typedef struct _fx_T2BN14K_form__atom_t {
   bool t0;
   struct _fx_N14K_form__atom_t t1;
} _fx_T2BN14K_form__atom_t;

typedef struct _fx_LT2BN14K_form__atom_t_data_t {
   int_ rc;
   struct _fx_LT2BN14K_form__atom_t_data_t* tl;
   struct _fx_T2BN14K_form__atom_t hd;
} _fx_LT2BN14K_form__atom_t_data_t, *_fx_LT2BN14K_form__atom_t;

typedef struct _fx_N12Ast__unary_t {
   int tag;
} _fx_N12Ast__unary_t;

typedef struct _fx_N12Ast__sctyp_t {
   int tag;
} _fx_N12Ast__sctyp_t;

typedef struct _fx_N13Ast__intrin_t {
   int tag;
   union {
      struct _fx_R9Ast__id_t IntrinMath;
      struct _fx_N12Ast__sctyp_t IntrinSaturate;
   } u;
} _fx_N13Ast__intrin_t;

typedef struct _fx_N15Ast__for_make_t {
   int tag;
} _fx_N15Ast__for_make_t;

typedef struct _fx_R16Ast__for_flags_t {
   bool for_flag_parallel;
   struct _fx_N15Ast__for_make_t for_flag_make;
   bool for_flag_unzip;
   bool for_flag_fold;
   bool for_flag_nested;
} _fx_R16Ast__for_flags_t;

typedef struct _fx_N13Ast__border_t {
   int tag;
} _fx_N13Ast__border_t;

typedef struct _fx_N18Ast__interpolate_t {
   int tag;
} _fx_N18Ast__interpolate_t;

typedef struct _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t {
   struct _fx_LN14K_form__ktyp_t_data_t* t0;
   struct _fx_N14K_form__ktyp_t_data_t* t1;
} _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t;

typedef struct _fx_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* t1;
} _fx_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t;

typedef struct _fx_T2iN14K_form__ktyp_t {
   int_ t0;
   struct _fx_N14K_form__ktyp_t_data_t* t1;
} _fx_T2iN14K_form__ktyp_t;

typedef struct _fx_N14K_form__ktyp_t_data_t {
   int_ rc;
   int tag;
   union {
      int_ KTypSInt;
      int_ KTypUInt;
      int_ KTypFloat;
      struct _fx_N14K_form__ktyp_t_data_t* KTypRawPointer;
      struct _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t KTypFun;
      struct _fx_LN14K_form__ktyp_t_data_t* KTypTuple;
      struct _fx_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t KTypRecord;
      struct _fx_R9Ast__id_t KTypName;
      struct _fx_T2iN14K_form__ktyp_t KTypArray;
      struct _fx_N14K_form__ktyp_t_data_t* KTypVector;
      struct _fx_N14K_form__ktyp_t_data_t* KTypList;
      struct _fx_N14K_form__ktyp_t_data_t* KTypRef;
   } u;
} _fx_N14K_form__ktyp_t_data_t, *_fx_N14K_form__ktyp_t;

typedef struct _fx_Ta3N14K_form__atom_t {
   struct _fx_N14K_form__atom_t t0;
   struct _fx_N14K_form__atom_t t1;
   struct _fx_N14K_form__atom_t t2;
} _fx_Ta3N14K_form__atom_t;

typedef struct _fx_N13K_form__dom_t {
   int tag;
   union {
      struct _fx_N14K_form__atom_t DomainElem;
      struct _fx_N14K_form__atom_t DomainFast;
      struct _fx_Ta3N14K_form__atom_t DomainRange;
   } u;
} _fx_N13K_form__dom_t;

typedef struct _fx_T2Nt6option1N14K_form__atom_tR10Ast__loc_t {
   struct _fx_Nt6option1N14K_form__atom_t t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2Nt6option1N14K_form__atom_tR10Ast__loc_t;

typedef struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N14K_form__ktyp_t_data_t* t0;
   struct _fx_R10Ast__loc_t t1;
} _fx_T2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N14K_form__atom_t t0;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t1;
} _fx_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N13Ast__binary_t_data_t* t0;
   struct _fx_N14K_form__atom_t t1;
   struct _fx_N14K_form__atom_t t2;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t3;
} _fx_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N12Ast__unary_t t0;
   struct _fx_N14K_form__atom_t t1;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t2;
} _fx_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_LN14K_form__atom_t_data_t {
   int_ rc;
   struct _fx_LN14K_form__atom_t_data_t* tl;
   struct _fx_N14K_form__atom_t hd;
} _fx_LN14K_form__atom_t_data_t, *_fx_LN14K_form__atom_t;

typedef struct _fx_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N13Ast__intrin_t t0;
   struct _fx_LN14K_form__atom_t_data_t* t1;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t2;
} _fx_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T2R9Ast__id_tN14K_form__kexp_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N14K_form__kexp_t_data_t* t1;
} _fx_T2R9Ast__id_tN14K_form__kexp_t;

typedef struct _fx_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_LN14K_form__kexp_t_data_t* t0;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t1;
} _fx_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N14K_form__kexp_t_data_t* t0;
   struct _fx_N14K_form__kexp_t_data_t* t1;
   struct _fx_N14K_form__kexp_t_data_t* t2;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t3;
} _fx_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_LN14K_form__atom_t_data_t* t1;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t2;
} _fx_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   int_ t1;
   struct _fx_LN14K_form__atom_t_data_t* t2;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t3;
} _fx_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_LN14K_form__atom_t_data_t* t0;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t1;
} _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_R9Ast__id_t t1;
   struct _fx_LN14K_form__atom_t_data_t* t2;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t3;
} _fx_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_LLT2BN14K_form__atom_t_data_t {
   int_ rc;
   struct _fx_LLT2BN14K_form__atom_t_data_t* tl;
   struct _fx_LT2BN14K_form__atom_t_data_t* hd;
} _fx_LLT2BN14K_form__atom_t_data_t, *_fx_LLT2BN14K_form__atom_t;

typedef struct _fx_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   bool t0;
   struct _fx_LLT2BN14K_form__atom_t_data_t* t1;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t2;
} _fx_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_LT2BN14K_form__atom_t_data_t* t0;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t1;
} _fx_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_LN13K_form__dom_t_data_t {
   int_ rc;
   struct _fx_LN13K_form__dom_t_data_t* tl;
   struct _fx_N13K_form__dom_t hd;
} _fx_LN13K_form__dom_t_data_t, *_fx_LN13K_form__dom_t;

typedef struct _fx_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N14K_form__atom_t t0;
   struct _fx_N13Ast__border_t t1;
   struct _fx_N18Ast__interpolate_t t2;
   struct _fx_LN13K_form__dom_t_data_t* t3;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t4;
} _fx_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   int_ t1;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t2;
} _fx_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N14K_form__atom_t t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t;

typedef struct _fx_T2LN14K_form__kexp_tN14K_form__kexp_t {
   struct _fx_LN14K_form__kexp_t_data_t* t0;
   struct _fx_N14K_form__kexp_t_data_t* t1;
} _fx_T2LN14K_form__kexp_tN14K_form__kexp_t;

typedef struct _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t {
   int_ rc;
   struct _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t* tl;
   struct _fx_T2LN14K_form__kexp_tN14K_form__kexp_t hd;
} _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t, *_fx_LT2LN14K_form__kexp_tN14K_form__kexp_t;

typedef struct _fx_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t* t0;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t1;
} _fx_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N14K_form__kexp_t_data_t* t0;
   struct _fx_N14K_form__kexp_t_data_t* t1;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t2;
} _fx_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T3R9Ast__id_tBR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   bool t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3R9Ast__id_tBR10Ast__loc_t;

typedef struct _fx_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_N14K_form__atom_t t0;
   struct _fx_N14K_form__ktyp_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T2R9Ast__id_tN13K_form__dom_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N13K_form__dom_t t1;
} _fx_T2R9Ast__id_tN13K_form__dom_t;

typedef struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t {
   int_ rc;
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* tl;
   struct _fx_T2R9Ast__id_tN13K_form__dom_t hd;
} _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t, *_fx_LT2R9Ast__id_tN13K_form__dom_t;

typedef struct _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t {
   struct _fx_N14K_form__kexp_t_data_t* t0;
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* t1;
   struct _fx_LR9Ast__id_t_data_t* t2;
} _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t;

typedef struct _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t {
   int_ rc;
   struct _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t* tl;
   struct _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t hd;
} _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t, *_fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t;

typedef struct _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t {
   struct _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t* t0;
   struct _fx_N14K_form__kexp_t_data_t* t1;
   struct _fx_R16Ast__for_flags_t t2;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t3;
} _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t {
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* t0;
   struct _fx_LR9Ast__id_t_data_t* t1;
   struct _fx_N14K_form__kexp_t_data_t* t2;
   struct _fx_R16Ast__for_flags_t t3;
   struct _fx_R10Ast__loc_t t4;
} _fx_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t;

typedef struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t {
   struct _fx_N14K_form__kexp_t_data_t* t0;
   struct _fx_N14K_form__kexp_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t;

typedef struct _fx_T2ST2N14K_form__ktyp_tR10Ast__loc_t {
   fx_str_t t0;
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t t1;
} _fx_T2ST2N14K_form__ktyp_tR10Ast__loc_t;

typedef struct _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_N14K_form__kexp_t_data_t* t1;
   struct _fx_R10Ast__loc_t t2;
} _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t;

typedef struct _fx_N14K_form__kexp_t_data_t {
   int_ rc;
   int tag;
   union {
      struct _fx_R10Ast__loc_t KExpNop;
      struct _fx_R10Ast__loc_t KExpBreak;
      struct _fx_R10Ast__loc_t KExpContinue;
      struct _fx_T2Nt6option1N14K_form__atom_tR10Ast__loc_t KExpReturn;
      struct _fx_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpAtom;
      struct _fx_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpBinary;
      struct _fx_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpUnary;
      struct _fx_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpIntrin;
      struct _fx_T2R9Ast__id_tN14K_form__kexp_t KExpSync;
      struct _fx_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t KExpSeq;
      struct _fx_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t KExpIf;
      struct _fx_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpCall;
      struct _fx_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpICall;
      struct _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpMkTuple;
      struct _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpMkRecord;
      struct _fx_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpMkClosure;
      struct _fx_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpMkArray;
      struct _fx_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t KExpMkVector;
      struct _fx_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t
         KExpAt;
      struct _fx_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t KExpMem;
      struct _fx_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t KExpAssign;
      struct _fx_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t KExpMatch;
      struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t KExpTryCatch;
      struct _fx_T3R9Ast__id_tBR10Ast__loc_t KExpThrow;
      struct _fx_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t KExpCast;
      struct _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t
         KExpMap;
      struct _fx_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t KExpFor;
      struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t KExpWhile;
      struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t KExpDoWhile;
      struct _fx_T2ST2N14K_form__ktyp_tR10Ast__loc_t KExpCCode;
      struct _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t KDefVal;
      struct _fx_rR17K_form__kdeffun_t_data_t* KDefFun;
      struct _fx_rR17K_form__kdefexn_t_data_t* KDefExn;
      struct _fx_rR21K_form__kdefvariant_t_data_t* KDefVariant;
      struct _fx_rR23K_form__kdefinterface_t_data_t* KDefInterface;
      struct _fx_rR17K_form__kdeftyp_t_data_t* KDefTyp;
      struct _fx_rR25K_form__kdefclosurevars_t_data_t* KDefClosureVars;
   } u;
} _fx_N14K_form__kexp_t_data_t, *_fx_N14K_form__kexp_t;

typedef struct _fx_R14Ast__pragmas_t {
   bool pragma_cpp;
   struct _fx_LT2SR10Ast__loc_t_data_t* pragma_clibs;
} _fx_R14Ast__pragmas_t;

typedef struct _fx_R17K_form__kmodule_t {
   struct _fx_R9Ast__id_t km_name;
   int_ km_idx;
   int_ km_toposort_idx;
   fx_str_t km_cname;
   struct _fx_LN14K_form__kexp_t_data_t* km_top;
   struct _fx_Li_data_t* km_deps;
   bool km_skip;
   bool km_main;
   struct _fx_R14Ast__pragmas_t km_pragmas;
} _fx_R17K_form__kmodule_t;

typedef struct _fx_LR17K_form__kmodule_t_data_t {
   int_ rc;
   struct _fx_LR17K_form__kmodule_t_data_t* tl;
   struct _fx_R17K_form__kmodule_t hd;
} _fx_LR17K_form__kmodule_t_data_t, *_fx_LR17K_form__kmodule_t;

typedef struct _fx_R24K_fuse_loops__arr_info_t {
   int_ arr_nused;
   int_ arr_nused_for;
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* arr_idl;
   struct _fx_N14K_form__kexp_t_data_t* arr_body;
   struct _fx_R16Ast__for_flags_t arr_map_flags;
} _fx_R24K_fuse_loops__arr_info_t;

typedef struct _fx_rR24K_fuse_loops__arr_info_t_data_t {
   int_ rc;
   struct _fx_R24K_fuse_loops__arr_info_t data;
} _fx_rR24K_fuse_loops__arr_info_t_data_t, *_fx_rR24K_fuse_loops__arr_info_t;

typedef struct _fx_T2R9Ast__id_trR24K_fuse_loops__arr_info_t {
   struct _fx_R9Ast__id_t t0;
   struct _fx_rR24K_fuse_loops__arr_info_t_data_t* t1;
} _fx_T2R9Ast__id_trR24K_fuse_loops__arr_info_t;

typedef struct _fx_Nt6option1T2R9Ast__id_trR24K_fuse_loops__arr_info_t {
   int tag;
   union {
      struct _fx_T2R9Ast__id_trR24K_fuse_loops__arr_info_t Some;
   } u;
} _fx_Nt6option1T2R9Ast__id_trR24K_fuse_loops__arr_info_t;

typedef struct _fx_Nt6option1rR24K_fuse_loops__arr_info_t {
   int tag;
   union {
      struct _fx_rR24K_fuse_loops__arr_info_t_data_t* Some;
   } u;
} _fx_Nt6option1rR24K_fuse_loops__arr_info_t;

typedef struct _fx_Nt6option1R9Ast__id_t {
   int tag;
   union {
      struct _fx_R9Ast__id_t Some;
   } u;
} _fx_Nt6option1R9Ast__id_t;

typedef struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t {
   struct _fx_N12Map__color_t t0;
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* t1;
   struct _fx_R9Ast__id_t t2;
   struct _fx_rR24K_fuse_loops__arr_info_t_data_t* t3;
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* t4;
} _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t;

typedef struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t {
   int_ rc;
   union {
      struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t
         Node;
   } u;
} _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t, *_fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t;

typedef struct _fx_FPi2R9Ast__id_tR9Ast__id_t {
   int (*fp)(struct _fx_R9Ast__id_t*, struct _fx_R9Ast__id_t*, int_*, void*);
   fx_fcv_t* fcv;
} _fx_FPi2R9Ast__id_tR9Ast__id_t;

typedef struct _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t {
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* root;
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t cmp;
} _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t;

typedef struct _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t {
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t* root;
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t cmp;
} _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t;

typedef struct _fx_T2Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tB {
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* t0;
   bool t1;
} _fx_T2Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tB;

typedef struct _fx_FPB2R9Ast__id_trR24K_fuse_loops__arr_info_t {
   int (*fp)(struct _fx_R9Ast__id_t*, struct _fx_rR24K_fuse_loops__arr_info_t_data_t*, bool*, void*);
   fx_fcv_t* fcv;
} _fx_FPB2R9Ast__id_trR24K_fuse_loops__arr_info_t;

typedef struct _fx_rRt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t {
   int_ rc;
   struct _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t data;
} _fx_rRt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t, *_fx_rRt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t;

typedef struct _fx_T2LT2R9Ast__id_tN13K_form__dom_tN14K_form__kexp_t {
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* t0;
   struct _fx_N14K_form__kexp_t_data_t* t1;
} _fx_T2LT2R9Ast__id_tN13K_form__dom_tN14K_form__kexp_t;

typedef struct _fx_LT2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t {
   int_ rc;
   struct _fx_LT2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* tl;
   struct _fx_T2R9Ast__id_trR24K_fuse_loops__arr_info_t hd;
} _fx_LT2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t, *_fx_LT2R9Ast__id_trR24K_fuse_loops__arr_info_t;

typedef struct _fx_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t {
   struct _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t t0;
   struct _fx_LT2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* t1;
} _fx_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t;

typedef struct _fx_T2Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tB {
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t* t0;
   bool t1;
} _fx_T2Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tB;

typedef struct _fx_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t {
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* t0;
   struct _fx_LN14K_form__kexp_t_data_t* t1;
   struct _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t t2;
} _fx_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t;

typedef struct {
   int_ rc;
   int_ data;
} _fx_E4Exit_data_t;

typedef struct {
   int_ rc;
   fx_str_t data;
} _fx_E4Fail_data_t;

typedef struct {
   int_ rc;
   struct _fx_T2Ta2iS data;
} _fx_E22LexerUtils__LexerError_data_t;

typedef struct {
   int_ rc;
   struct _fx_T2R10Ast__loc_tS data;
} _fx_E17Ast__CompileError_data_t;

typedef struct {
   int_ rc;
   struct _fx_T2R10Ast__loc_tS data;
} _fx_E18Parser__ParseError_data_t;

static void _fx_free_T2Ta2iS(struct _fx_T2Ta2iS* dst)
{
   fx_free_str(&dst->t1);
}

static void _fx_copy_T2Ta2iS(struct _fx_T2Ta2iS* src, struct _fx_T2Ta2iS* dst)
{
   dst->t0 = src->t0;
   fx_copy_str(&src->t1, &dst->t1);
}

static void _fx_make_T2Ta2iS(struct _fx_Ta2i* t0, fx_str_t* t1, struct _fx_T2Ta2iS* fx_result)
{
   fx_result->t0 = *t0;
   fx_copy_str(t1, &fx_result->t1);
}

static int _fx_cons_LN12Ast__scope_t(
   struct _fx_N12Ast__scope_t* hd,
   struct _fx_LN12Ast__scope_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN12Ast__scope_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN12Ast__scope_t, FX_COPY_SIMPLE_BY_PTR);
}

static int _fx_cons_LR9Ast__id_t(
   struct _fx_R9Ast__id_t* hd,
   struct _fx_LR9Ast__id_t_data_t* tl,
   bool addref_tl,
   struct _fx_LR9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LR9Ast__id_t, FX_COPY_SIMPLE_BY_PTR);
}

static void _fx_free_R16Ast__val_flags_t(struct _fx_R16Ast__val_flags_t* dst)
{
   fx_free_list_simple(&dst->val_flag_global);
}

static void _fx_copy_R16Ast__val_flags_t(struct _fx_R16Ast__val_flags_t* src, struct _fx_R16Ast__val_flags_t* dst)
{
   dst->val_flag_arg = src->val_flag_arg;
   dst->val_flag_mutable = src->val_flag_mutable;
   dst->val_flag_temp = src->val_flag_temp;
   dst->val_flag_tempref = src->val_flag_tempref;
   dst->val_flag_private = src->val_flag_private;
   dst->val_flag_subarray = src->val_flag_subarray;
   dst->val_flag_instance = src->val_flag_instance;
   dst->val_flag_method = src->val_flag_method;
   dst->val_flag_ctor = src->val_flag_ctor;
   FX_COPY_PTR(src->val_flag_global, &dst->val_flag_global);
}

static void _fx_make_R16Ast__val_flags_t(
   bool r_val_flag_arg,
   bool r_val_flag_mutable,
   bool r_val_flag_temp,
   bool r_val_flag_tempref,
   bool r_val_flag_private,
   bool r_val_flag_subarray,
   bool r_val_flag_instance,
   struct _fx_T2R9Ast__id_ti* r_val_flag_method,
   int_ r_val_flag_ctor,
   struct _fx_LN12Ast__scope_t_data_t* r_val_flag_global,
   struct _fx_R16Ast__val_flags_t* fx_result)
{
   fx_result->val_flag_arg = r_val_flag_arg;
   fx_result->val_flag_mutable = r_val_flag_mutable;
   fx_result->val_flag_temp = r_val_flag_temp;
   fx_result->val_flag_tempref = r_val_flag_tempref;
   fx_result->val_flag_private = r_val_flag_private;
   fx_result->val_flag_subarray = r_val_flag_subarray;
   fx_result->val_flag_instance = r_val_flag_instance;
   fx_result->val_flag_method = *r_val_flag_method;
   fx_result->val_flag_ctor = r_val_flag_ctor;
   FX_COPY_PTR(r_val_flag_global, &fx_result->val_flag_global);
}

static void _fx_free_T2R9Ast__id_tN14K_form__ktyp_t(struct _fx_T2R9Ast__id_tN14K_form__ktyp_t* dst)
{
   _fx_free_N14K_form__ktyp_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tN14K_form__ktyp_t(
   struct _fx_T2R9Ast__id_tN14K_form__ktyp_t* src,
   struct _fx_T2R9Ast__id_tN14K_form__ktyp_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tN14K_form__ktyp_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N14K_form__ktyp_t_data_t* t1,
   struct _fx_T2R9Ast__id_tN14K_form__ktyp_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2R9Ast__id_tN14K_form__ktyp_t(struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2R9Ast__id_tN14K_form__ktyp_t, _fx_free_T2R9Ast__id_tN14K_form__ktyp_t);
}

static int _fx_cons_LT2R9Ast__id_tN14K_form__ktyp_t(
   struct _fx_T2R9Ast__id_tN14K_form__ktyp_t* hd,
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2R9Ast__id_tN14K_form__ktyp_t, _fx_copy_T2R9Ast__id_tN14K_form__ktyp_t);
}

static void _fx_free_R23K_form__kdefinterface_t(struct _fx_R23K_form__kdefinterface_t* dst)
{
   fx_free_str(&dst->ki_cname);
   _fx_free_LT2R9Ast__id_tN14K_form__ktyp_t(&dst->ki_all_methods);
   fx_free_list_simple(&dst->ki_scope);
}

static void _fx_copy_R23K_form__kdefinterface_t(
   struct _fx_R23K_form__kdefinterface_t* src,
   struct _fx_R23K_form__kdefinterface_t* dst)
{
   dst->ki_name = src->ki_name;
   dst->ki_base = src->ki_base;
   fx_copy_str(&src->ki_cname, &dst->ki_cname);
   dst->ki_id = src->ki_id;
   FX_COPY_PTR(src->ki_all_methods, &dst->ki_all_methods);
   FX_COPY_PTR(src->ki_scope, &dst->ki_scope);
   dst->ki_loc = src->ki_loc;
}

static void _fx_make_R23K_form__kdefinterface_t(
   struct _fx_R9Ast__id_t* r_ki_name,
   struct _fx_R9Ast__id_t* r_ki_base,
   fx_str_t* r_ki_cname,
   struct _fx_R9Ast__id_t* r_ki_id,
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* r_ki_all_methods,
   struct _fx_LN12Ast__scope_t_data_t* r_ki_scope,
   struct _fx_R10Ast__loc_t* r_ki_loc,
   struct _fx_R23K_form__kdefinterface_t* fx_result)
{
   fx_result->ki_name = *r_ki_name;
   fx_result->ki_base = *r_ki_base;
   fx_copy_str(r_ki_cname, &fx_result->ki_cname);
   fx_result->ki_id = *r_ki_id;
   FX_COPY_PTR(r_ki_all_methods, &fx_result->ki_all_methods);
   FX_COPY_PTR(r_ki_scope, &fx_result->ki_scope);
   fx_result->ki_loc = *r_ki_loc;
}

static void _fx_free_rR23K_form__kdefinterface_t(struct _fx_rR23K_form__kdefinterface_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR23K_form__kdefinterface_t, _fx_free_R23K_form__kdefinterface_t);
}

static int _fx_make_rR23K_form__kdefinterface_t(
   struct _fx_R23K_form__kdefinterface_t* arg,
   struct _fx_rR23K_form__kdefinterface_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR23K_form__kdefinterface_t, _fx_copy_R23K_form__kdefinterface_t);
}

static void _fx_free_R17K_form__kdeffun_t(struct _fx_R17K_form__kdeffun_t* dst)
{
   fx_free_str(&dst->kf_cname);
   fx_free_list_simple(&dst->kf_params);
   _fx_free_N14K_form__ktyp_t(&dst->kf_rt);
   _fx_free_N14K_form__kexp_t(&dst->kf_body);
   fx_free_list_simple(&dst->kf_scope);
}

static void _fx_copy_R17K_form__kdeffun_t(struct _fx_R17K_form__kdeffun_t* src, struct _fx_R17K_form__kdeffun_t* dst)
{
   dst->kf_name = src->kf_name;
   fx_copy_str(&src->kf_cname, &dst->kf_cname);
   FX_COPY_PTR(src->kf_params, &dst->kf_params);
   FX_COPY_PTR(src->kf_rt, &dst->kf_rt);
   FX_COPY_PTR(src->kf_body, &dst->kf_body);
   dst->kf_flags = src->kf_flags;
   dst->kf_closure = src->kf_closure;
   FX_COPY_PTR(src->kf_scope, &dst->kf_scope);
   dst->kf_loc = src->kf_loc;
}

static void _fx_make_R17K_form__kdeffun_t(
   struct _fx_R9Ast__id_t* r_kf_name,
   fx_str_t* r_kf_cname,
   struct _fx_LR9Ast__id_t_data_t* r_kf_params,
   struct _fx_N14K_form__ktyp_t_data_t* r_kf_rt,
   struct _fx_N14K_form__kexp_t_data_t* r_kf_body,
   struct _fx_R16Ast__fun_flags_t* r_kf_flags,
   struct _fx_R25K_form__kdefclosureinfo_t* r_kf_closure,
   struct _fx_LN12Ast__scope_t_data_t* r_kf_scope,
   struct _fx_R10Ast__loc_t* r_kf_loc,
   struct _fx_R17K_form__kdeffun_t* fx_result)
{
   fx_result->kf_name = *r_kf_name;
   fx_copy_str(r_kf_cname, &fx_result->kf_cname);
   FX_COPY_PTR(r_kf_params, &fx_result->kf_params);
   FX_COPY_PTR(r_kf_rt, &fx_result->kf_rt);
   FX_COPY_PTR(r_kf_body, &fx_result->kf_body);
   fx_result->kf_flags = *r_kf_flags;
   fx_result->kf_closure = *r_kf_closure;
   FX_COPY_PTR(r_kf_scope, &fx_result->kf_scope);
   fx_result->kf_loc = *r_kf_loc;
}

static void _fx_free_rR17K_form__kdeffun_t(struct _fx_rR17K_form__kdeffun_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR17K_form__kdeffun_t, _fx_free_R17K_form__kdeffun_t);
}

static int _fx_make_rR17K_form__kdeffun_t(
   struct _fx_R17K_form__kdeffun_t* arg,
   struct _fx_rR17K_form__kdeffun_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR17K_form__kdeffun_t, _fx_copy_R17K_form__kdeffun_t);
}

static void _fx_free_R17K_form__kdefexn_t(struct _fx_R17K_form__kdefexn_t* dst)
{
   fx_free_str(&dst->ke_cname);
   fx_free_str(&dst->ke_base_cname);
   _fx_free_N14K_form__ktyp_t(&dst->ke_typ);
   fx_free_list_simple(&dst->ke_scope);
}

static void _fx_copy_R17K_form__kdefexn_t(struct _fx_R17K_form__kdefexn_t* src, struct _fx_R17K_form__kdefexn_t* dst)
{
   dst->ke_name = src->ke_name;
   fx_copy_str(&src->ke_cname, &dst->ke_cname);
   fx_copy_str(&src->ke_base_cname, &dst->ke_base_cname);
   FX_COPY_PTR(src->ke_typ, &dst->ke_typ);
   dst->ke_std = src->ke_std;
   dst->ke_tag = src->ke_tag;
   dst->ke_make = src->ke_make;
   FX_COPY_PTR(src->ke_scope, &dst->ke_scope);
   dst->ke_loc = src->ke_loc;
}

static void _fx_make_R17K_form__kdefexn_t(
   struct _fx_R9Ast__id_t* r_ke_name,
   fx_str_t* r_ke_cname,
   fx_str_t* r_ke_base_cname,
   struct _fx_N14K_form__ktyp_t_data_t* r_ke_typ,
   bool r_ke_std,
   struct _fx_R9Ast__id_t* r_ke_tag,
   struct _fx_R9Ast__id_t* r_ke_make,
   struct _fx_LN12Ast__scope_t_data_t* r_ke_scope,
   struct _fx_R10Ast__loc_t* r_ke_loc,
   struct _fx_R17K_form__kdefexn_t* fx_result)
{
   fx_result->ke_name = *r_ke_name;
   fx_copy_str(r_ke_cname, &fx_result->ke_cname);
   fx_copy_str(r_ke_base_cname, &fx_result->ke_base_cname);
   FX_COPY_PTR(r_ke_typ, &fx_result->ke_typ);
   fx_result->ke_std = r_ke_std;
   fx_result->ke_tag = *r_ke_tag;
   fx_result->ke_make = *r_ke_make;
   FX_COPY_PTR(r_ke_scope, &fx_result->ke_scope);
   fx_result->ke_loc = *r_ke_loc;
}

static void _fx_free_rR17K_form__kdefexn_t(struct _fx_rR17K_form__kdefexn_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR17K_form__kdefexn_t, _fx_free_R17K_form__kdefexn_t);
}

static int _fx_make_rR17K_form__kdefexn_t(
   struct _fx_R17K_form__kdefexn_t* arg,
   struct _fx_rR17K_form__kdefexn_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR17K_form__kdefexn_t, _fx_copy_R17K_form__kdefexn_t);
}

static void _fx_free_LN14K_form__ktyp_t(struct _fx_LN14K_form__ktyp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LN14K_form__ktyp_t, _fx_free_N14K_form__ktyp_t);
}

static int _fx_cons_LN14K_form__ktyp_t(
   struct _fx_N14K_form__ktyp_t_data_t* hd,
   struct _fx_LN14K_form__ktyp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN14K_form__ktyp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN14K_form__ktyp_t, FX_COPY_PTR);
}

static void _fx_free_T2R9Ast__id_tLR9Ast__id_t(struct _fx_T2R9Ast__id_tLR9Ast__id_t* dst)
{
   fx_free_list_simple(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tLR9Ast__id_t(
   struct _fx_T2R9Ast__id_tLR9Ast__id_t* src,
   struct _fx_T2R9Ast__id_tLR9Ast__id_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tLR9Ast__id_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_LR9Ast__id_t_data_t* t1,
   struct _fx_T2R9Ast__id_tLR9Ast__id_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2R9Ast__id_tLR9Ast__id_t(struct _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2R9Ast__id_tLR9Ast__id_t, _fx_free_T2R9Ast__id_tLR9Ast__id_t);
}

static int _fx_cons_LT2R9Ast__id_tLR9Ast__id_t(
   struct _fx_T2R9Ast__id_tLR9Ast__id_t* hd,
   struct _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2R9Ast__id_tLR9Ast__id_t, _fx_copy_T2R9Ast__id_tLR9Ast__id_t);
}

static void _fx_free_R21K_form__kdefvariant_t(struct _fx_R21K_form__kdefvariant_t* dst)
{
   fx_free_str(&dst->kvar_cname);
   _fx_free_LN14K_form__ktyp_t(&dst->kvar_targs);
   _fx_free_LT2R9Ast__id_tN14K_form__ktyp_t(&dst->kvar_cases);
   fx_free_list_simple(&dst->kvar_ctors);
   _fx_free_LT2R9Ast__id_tLR9Ast__id_t(&dst->kvar_ifaces);
   fx_free_list_simple(&dst->kvar_scope);
}

static void _fx_copy_R21K_form__kdefvariant_t(
   struct _fx_R21K_form__kdefvariant_t* src,
   struct _fx_R21K_form__kdefvariant_t* dst)
{
   dst->kvar_name = src->kvar_name;
   fx_copy_str(&src->kvar_cname, &dst->kvar_cname);
   dst->kvar_proto = src->kvar_proto;
   dst->kvar_props = src->kvar_props;
   FX_COPY_PTR(src->kvar_targs, &dst->kvar_targs);
   FX_COPY_PTR(src->kvar_cases, &dst->kvar_cases);
   FX_COPY_PTR(src->kvar_ctors, &dst->kvar_ctors);
   dst->kvar_flags = src->kvar_flags;
   FX_COPY_PTR(src->kvar_ifaces, &dst->kvar_ifaces);
   FX_COPY_PTR(src->kvar_scope, &dst->kvar_scope);
   dst->kvar_loc = src->kvar_loc;
}

static void _fx_make_R21K_form__kdefvariant_t(
   struct _fx_R9Ast__id_t* r_kvar_name,
   fx_str_t* r_kvar_cname,
   struct _fx_R9Ast__id_t* r_kvar_proto,
   struct _fx_Nt6option1R17K_form__ktprops_t* r_kvar_props,
   struct _fx_LN14K_form__ktyp_t_data_t* r_kvar_targs,
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* r_kvar_cases,
   struct _fx_LR9Ast__id_t_data_t* r_kvar_ctors,
   struct _fx_R16Ast__var_flags_t* r_kvar_flags,
   struct _fx_LT2R9Ast__id_tLR9Ast__id_t_data_t* r_kvar_ifaces,
   struct _fx_LN12Ast__scope_t_data_t* r_kvar_scope,
   struct _fx_R10Ast__loc_t* r_kvar_loc,
   struct _fx_R21K_form__kdefvariant_t* fx_result)
{
   fx_result->kvar_name = *r_kvar_name;
   fx_copy_str(r_kvar_cname, &fx_result->kvar_cname);
   fx_result->kvar_proto = *r_kvar_proto;
   fx_result->kvar_props = *r_kvar_props;
   FX_COPY_PTR(r_kvar_targs, &fx_result->kvar_targs);
   FX_COPY_PTR(r_kvar_cases, &fx_result->kvar_cases);
   FX_COPY_PTR(r_kvar_ctors, &fx_result->kvar_ctors);
   fx_result->kvar_flags = *r_kvar_flags;
   FX_COPY_PTR(r_kvar_ifaces, &fx_result->kvar_ifaces);
   FX_COPY_PTR(r_kvar_scope, &fx_result->kvar_scope);
   fx_result->kvar_loc = *r_kvar_loc;
}

static void _fx_free_rR21K_form__kdefvariant_t(struct _fx_rR21K_form__kdefvariant_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR21K_form__kdefvariant_t, _fx_free_R21K_form__kdefvariant_t);
}

static int _fx_make_rR21K_form__kdefvariant_t(
   struct _fx_R21K_form__kdefvariant_t* arg,
   struct _fx_rR21K_form__kdefvariant_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR21K_form__kdefvariant_t, _fx_copy_R21K_form__kdefvariant_t);
}

static void _fx_free_R17K_form__kdeftyp_t(struct _fx_R17K_form__kdeftyp_t* dst)
{
   fx_free_str(&dst->kt_cname);
   _fx_free_LN14K_form__ktyp_t(&dst->kt_targs);
   _fx_free_N14K_form__ktyp_t(&dst->kt_typ);
   fx_free_list_simple(&dst->kt_scope);
}

static void _fx_copy_R17K_form__kdeftyp_t(struct _fx_R17K_form__kdeftyp_t* src, struct _fx_R17K_form__kdeftyp_t* dst)
{
   dst->kt_name = src->kt_name;
   fx_copy_str(&src->kt_cname, &dst->kt_cname);
   dst->kt_proto = src->kt_proto;
   dst->kt_props = src->kt_props;
   FX_COPY_PTR(src->kt_targs, &dst->kt_targs);
   FX_COPY_PTR(src->kt_typ, &dst->kt_typ);
   FX_COPY_PTR(src->kt_scope, &dst->kt_scope);
   dst->kt_loc = src->kt_loc;
}

static void _fx_make_R17K_form__kdeftyp_t(
   struct _fx_R9Ast__id_t* r_kt_name,
   fx_str_t* r_kt_cname,
   struct _fx_R9Ast__id_t* r_kt_proto,
   struct _fx_Nt6option1R17K_form__ktprops_t* r_kt_props,
   struct _fx_LN14K_form__ktyp_t_data_t* r_kt_targs,
   struct _fx_N14K_form__ktyp_t_data_t* r_kt_typ,
   struct _fx_LN12Ast__scope_t_data_t* r_kt_scope,
   struct _fx_R10Ast__loc_t* r_kt_loc,
   struct _fx_R17K_form__kdeftyp_t* fx_result)
{
   fx_result->kt_name = *r_kt_name;
   fx_copy_str(r_kt_cname, &fx_result->kt_cname);
   fx_result->kt_proto = *r_kt_proto;
   fx_result->kt_props = *r_kt_props;
   FX_COPY_PTR(r_kt_targs, &fx_result->kt_targs);
   FX_COPY_PTR(r_kt_typ, &fx_result->kt_typ);
   FX_COPY_PTR(r_kt_scope, &fx_result->kt_scope);
   fx_result->kt_loc = *r_kt_loc;
}

static void _fx_free_rR17K_form__kdeftyp_t(struct _fx_rR17K_form__kdeftyp_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR17K_form__kdeftyp_t, _fx_free_R17K_form__kdeftyp_t);
}

static int _fx_make_rR17K_form__kdeftyp_t(
   struct _fx_R17K_form__kdeftyp_t* arg,
   struct _fx_rR17K_form__kdeftyp_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR17K_form__kdeftyp_t, _fx_copy_R17K_form__kdeftyp_t);
}

static void _fx_free_R25K_form__kdefclosurevars_t(struct _fx_R25K_form__kdefclosurevars_t* dst)
{
   fx_free_str(&dst->kcv_cname);
   _fx_free_LT2R9Ast__id_tN14K_form__ktyp_t(&dst->kcv_freevars);
   fx_free_list_simple(&dst->kcv_orig_freevars);
   fx_free_list_simple(&dst->kcv_scope);
}

static void _fx_copy_R25K_form__kdefclosurevars_t(
   struct _fx_R25K_form__kdefclosurevars_t* src,
   struct _fx_R25K_form__kdefclosurevars_t* dst)
{
   dst->kcv_name = src->kcv_name;
   fx_copy_str(&src->kcv_cname, &dst->kcv_cname);
   FX_COPY_PTR(src->kcv_freevars, &dst->kcv_freevars);
   FX_COPY_PTR(src->kcv_orig_freevars, &dst->kcv_orig_freevars);
   FX_COPY_PTR(src->kcv_scope, &dst->kcv_scope);
   dst->kcv_loc = src->kcv_loc;
}

static void _fx_make_R25K_form__kdefclosurevars_t(
   struct _fx_R9Ast__id_t* r_kcv_name,
   fx_str_t* r_kcv_cname,
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* r_kcv_freevars,
   struct _fx_LR9Ast__id_t_data_t* r_kcv_orig_freevars,
   struct _fx_LN12Ast__scope_t_data_t* r_kcv_scope,
   struct _fx_R10Ast__loc_t* r_kcv_loc,
   struct _fx_R25K_form__kdefclosurevars_t* fx_result)
{
   fx_result->kcv_name = *r_kcv_name;
   fx_copy_str(r_kcv_cname, &fx_result->kcv_cname);
   FX_COPY_PTR(r_kcv_freevars, &fx_result->kcv_freevars);
   FX_COPY_PTR(r_kcv_orig_freevars, &fx_result->kcv_orig_freevars);
   FX_COPY_PTR(r_kcv_scope, &fx_result->kcv_scope);
   fx_result->kcv_loc = *r_kcv_loc;
}

static void _fx_free_rR25K_form__kdefclosurevars_t(struct _fx_rR25K_form__kdefclosurevars_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR25K_form__kdefclosurevars_t, _fx_free_R25K_form__kdefclosurevars_t);
}

static int _fx_make_rR25K_form__kdefclosurevars_t(
   struct _fx_R25K_form__kdefclosurevars_t* arg,
   struct _fx_rR25K_form__kdefclosurevars_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR25K_form__kdefclosurevars_t, _fx_copy_R25K_form__kdefclosurevars_t);
}

static void
   _fx_free_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t*
      dst)
{
   _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&dst->t1);
   _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&dst->t4);
}

static void
   _fx_copy_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t*
      src,
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t*
      dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
   dst->t3 = src->t3;
   FX_COPY_PTR(src->t4, &dst->t4);
}

static void
   _fx_make_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
   struct _fx_N12Map__color_t* t0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t* t1,
   struct _fx_R9Ast__id_t* t2,
   struct _fx_R9Ast__id_t* t3,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t* t4,
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t*
      fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
   fx_result->t3 = *t3;
   FX_COPY_PTR(t4, &fx_result->t4);
}

static void _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
         &(*dst)->u.Node);
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_T2R10Ast__loc_tS(struct _fx_T2R10Ast__loc_tS* dst)
{
   fx_free_str(&dst->t1);
}

static void _fx_copy_T2R10Ast__loc_tS(struct _fx_T2R10Ast__loc_tS* src, struct _fx_T2R10Ast__loc_tS* dst)
{
   dst->t0 = src->t0;
   fx_copy_str(&src->t1, &dst->t1);
}

static void _fx_make_T2R10Ast__loc_tS(struct _fx_R10Ast__loc_t* t0, fx_str_t* t1, struct _fx_T2R10Ast__loc_tS* fx_result)
{
   fx_result->t0 = *t0;
   fx_copy_str(t1, &fx_result->t1);
}

static void _fx_free_N13Ast__binary_t(struct _fx_N13Ast__binary_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      switch ((*dst)->tag) {
      case 27:
         _fx_free_N13Ast__binary_t(&(*dst)->u.OpAugBinary); break;
      default:
         ;
      }
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_T2SR10Ast__loc_t(struct _fx_T2SR10Ast__loc_t* dst)
{
   fx_free_str(&dst->t0);
}

static void _fx_copy_T2SR10Ast__loc_t(struct _fx_T2SR10Ast__loc_t* src, struct _fx_T2SR10Ast__loc_t* dst)
{
   fx_copy_str(&src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2SR10Ast__loc_t(fx_str_t* t0, struct _fx_R10Ast__loc_t* t1, struct _fx_T2SR10Ast__loc_t* fx_result)
{
   fx_copy_str(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_LT2SR10Ast__loc_t(struct _fx_LT2SR10Ast__loc_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2SR10Ast__loc_t, _fx_free_T2SR10Ast__loc_t);
}

static int _fx_cons_LT2SR10Ast__loc_t(
   struct _fx_T2SR10Ast__loc_t* hd,
   struct _fx_LT2SR10Ast__loc_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2SR10Ast__loc_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2SR10Ast__loc_t, _fx_copy_T2SR10Ast__loc_t);
}

static int _fx_cons_Li(int_ hd, struct _fx_Li_data_t* tl, bool addref_tl, struct _fx_Li_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_Li, FX_COPY_SIMPLE);
}

static void _fx_free_Nt6option1N14K_form__kexp_t(struct _fx_Nt6option1N14K_form__kexp_t* dst)
{
   switch (dst->tag) {
   case 2:
      _fx_free_N14K_form__kexp_t(&dst->u.Some); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_Nt6option1N14K_form__kexp_t(
   struct _fx_Nt6option1N14K_form__kexp_t* src,
   struct _fx_Nt6option1N14K_form__kexp_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 2:
      FX_COPY_PTR(src->u.Some, &dst->u.Some); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_N14K_form__klit_t(struct _fx_N14K_form__klit_t* dst)
{
   switch (dst->tag) {
   case 5:
      fx_free_str(&dst->u.KLitString); break;
   case 8:
      _fx_free_N14K_form__ktyp_t(&dst->u.KLitNil); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_N14K_form__klit_t(struct _fx_N14K_form__klit_t* src, struct _fx_N14K_form__klit_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 5:
      fx_copy_str(&src->u.KLitString, &dst->u.KLitString); break;
   case 8:
      FX_COPY_PTR(src->u.KLitNil, &dst->u.KLitNil); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_N14K_form__atom_t(struct _fx_N14K_form__atom_t* dst)
{
   switch (dst->tag) {
   case 2:
      _fx_free_N14K_form__klit_t(&dst->u.AtomLit); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_N14K_form__atom_t(struct _fx_N14K_form__atom_t* src, struct _fx_N14K_form__atom_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 2:
      _fx_copy_N14K_form__klit_t(&src->u.AtomLit, &dst->u.AtomLit); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_R22K_form__k_fold_callb_t(struct _fx_R22K_form__k_fold_callb_t* dst)
{
   _fx_free_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t(&dst->kcb_fold_ktyp);
   _fx_free_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t(&dst->kcb_fold_kexp);
   _fx_free_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t(&dst->kcb_fold_atom);
}

static void _fx_copy_R22K_form__k_fold_callb_t(
   struct _fx_R22K_form__k_fold_callb_t* src,
   struct _fx_R22K_form__k_fold_callb_t* dst)
{
   FX_COPY_PTR(src->kcb_fold_ktyp, &dst->kcb_fold_ktyp);
   FX_COPY_PTR(src->kcb_fold_kexp, &dst->kcb_fold_kexp);
   FX_COPY_PTR(src->kcb_fold_atom, &dst->kcb_fold_atom);
}

static void _fx_make_R22K_form__k_fold_callb_t(
   struct _fx_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t* r_kcb_fold_ktyp,
   struct _fx_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t_data_t* r_kcb_fold_kexp,
   struct _fx_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t* r_kcb_fold_atom,
   struct _fx_R22K_form__k_fold_callb_t* fx_result)
{
   FX_COPY_PTR(r_kcb_fold_ktyp, &fx_result->kcb_fold_ktyp);
   FX_COPY_PTR(r_kcb_fold_kexp, &fx_result->kcb_fold_kexp);
   FX_COPY_PTR(r_kcb_fold_atom, &fx_result->kcb_fold_atom);
}

static void _fx_free_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t(
   struct _fx_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      fx_free_fp(&(*dst)->u.Some); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t(
   struct _fx_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      fx_free_fp(&(*dst)->u.Some); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t(
   struct _fx_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      fx_free_fp(&(*dst)->u.Some); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_R17K_form__k_callb_t(struct _fx_R17K_form__k_callb_t* dst)
{
   _fx_free_Nt6option1FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t(&dst->kcb_ktyp);
   _fx_free_Nt6option1FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t(&dst->kcb_kexp);
   _fx_free_Nt6option1FPN14K_form__atom_t3N14K_form__atom_tR10Ast__loc_tR17K_form__k_callb_t(&dst->kcb_atom);
}

static void _fx_copy_R17K_form__k_callb_t(struct _fx_R17K_form__k_callb_t* src, struct _fx_R17K_form__k_callb_t* dst)
{
   FX_COPY_PTR(src->kcb_ktyp, &dst->kcb_ktyp);
   FX_COPY_PTR(src->kcb_kexp, &dst->kcb_kexp);
   FX_COPY_PTR(src->kcb_atom, &dst->kcb_atom);
}

static void _fx_make_R17K_form__k_callb_t(
   struct _fx_Nt6option1FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t_data_t* r_kcb_ktyp,
   struct _fx_Nt6option1FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t_data_t* r_kcb_kexp,
   struct _fx_Nt6option1FPN14K_form__atom_t3N14K_form__atom_tR10Ast__loc_tR17K_form__k_callb_t_data_t* r_kcb_atom,
   struct _fx_R17K_form__k_callb_t* fx_result)
{
   FX_COPY_PTR(r_kcb_ktyp, &fx_result->kcb_ktyp);
   FX_COPY_PTR(r_kcb_kexp, &fx_result->kcb_kexp);
   FX_COPY_PTR(r_kcb_atom, &fx_result->kcb_atom);
}

static void _fx_free_Nt6option1FPN14K_form__atom_t3N14K_form__atom_tR10Ast__loc_tR17K_form__k_callb_t(
   struct _fx_Nt6option1FPN14K_form__atom_t3N14K_form__atom_tR10Ast__loc_tR17K_form__k_callb_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      fx_free_fp(&(*dst)->u.Some); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Nt6option1FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t(
   struct _fx_Nt6option1FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      fx_free_fp(&(*dst)->u.Some); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Nt6option1FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t(
   struct _fx_Nt6option1FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      fx_free_fp(&(*dst)->u.Some); fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Nt6option1N14K_form__atom_t(struct _fx_Nt6option1N14K_form__atom_t* dst)
{
   switch (dst->tag) {
   case 2:
      _fx_free_N14K_form__atom_t(&dst->u.Some); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_Nt6option1N14K_form__atom_t(
   struct _fx_Nt6option1N14K_form__atom_t* src,
   struct _fx_Nt6option1N14K_form__atom_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 2:
      _fx_copy_N14K_form__atom_t(&src->u.Some, &dst->u.Some); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_LN14K_form__kexp_t(struct _fx_LN14K_form__kexp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LN14K_form__kexp_t, _fx_free_N14K_form__kexp_t);
}

static int _fx_cons_LN14K_form__kexp_t(
   struct _fx_N14K_form__kexp_t_data_t* hd,
   struct _fx_LN14K_form__kexp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN14K_form__kexp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN14K_form__kexp_t, FX_COPY_PTR);
}

static void _fx_free_T2BN14K_form__atom_t(struct _fx_T2BN14K_form__atom_t* dst)
{
   _fx_free_N14K_form__atom_t(&dst->t1);
}

static void _fx_copy_T2BN14K_form__atom_t(struct _fx_T2BN14K_form__atom_t* src, struct _fx_T2BN14K_form__atom_t* dst)
{
   dst->t0 = src->t0;
   _fx_copy_N14K_form__atom_t(&src->t1, &dst->t1);
}

static void _fx_make_T2BN14K_form__atom_t(bool t0, struct _fx_N14K_form__atom_t* t1, struct _fx_T2BN14K_form__atom_t* fx_result)
{
   fx_result->t0 = t0;
   _fx_copy_N14K_form__atom_t(t1, &fx_result->t1);
}

static void _fx_free_LT2BN14K_form__atom_t(struct _fx_LT2BN14K_form__atom_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2BN14K_form__atom_t, _fx_free_T2BN14K_form__atom_t);
}

static int _fx_cons_LT2BN14K_form__atom_t(
   struct _fx_T2BN14K_form__atom_t* hd,
   struct _fx_LT2BN14K_form__atom_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2BN14K_form__atom_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2BN14K_form__atom_t, _fx_copy_T2BN14K_form__atom_t);
}

static void _fx_free_T2LN14K_form__ktyp_tN14K_form__ktyp_t(struct _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t* dst)
{
   _fx_free_LN14K_form__ktyp_t(&dst->t0);
   _fx_free_N14K_form__ktyp_t(&dst->t1);
}

static void _fx_copy_T2LN14K_form__ktyp_tN14K_form__ktyp_t(
   struct _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t* src,
   struct _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2LN14K_form__ktyp_tN14K_form__ktyp_t(
   struct _fx_LN14K_form__ktyp_t_data_t* t0,
   struct _fx_N14K_form__ktyp_t_data_t* t1,
   struct _fx_T2LN14K_form__ktyp_tN14K_form__ktyp_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t(struct _fx_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t* dst)
{
   _fx_free_LT2R9Ast__id_tN14K_form__ktyp_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t(
   struct _fx_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t* src,
   struct _fx_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_LT2R9Ast__id_tN14K_form__ktyp_t_data_t* t1,
   struct _fx_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_T2iN14K_form__ktyp_t(struct _fx_T2iN14K_form__ktyp_t* dst)
{
   _fx_free_N14K_form__ktyp_t(&dst->t1);
}

static void _fx_copy_T2iN14K_form__ktyp_t(struct _fx_T2iN14K_form__ktyp_t* src, struct _fx_T2iN14K_form__ktyp_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2iN14K_form__ktyp_t(
   int_ t0,
   struct _fx_N14K_form__ktyp_t_data_t* t1,
   struct _fx_T2iN14K_form__ktyp_t* fx_result)
{
   fx_result->t0 = t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_N14K_form__ktyp_t(struct _fx_N14K_form__ktyp_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      switch ((*dst)->tag) {
      case 12:
         _fx_free_N14K_form__ktyp_t(&(*dst)->u.KTypRawPointer); break;
      case 13:
         _fx_free_T2LN14K_form__ktyp_tN14K_form__ktyp_t(&(*dst)->u.KTypFun); break;
      case 14:
         _fx_free_LN14K_form__ktyp_t(&(*dst)->u.KTypTuple); break;
      case 15:
         _fx_free_T2R9Ast__id_tLT2R9Ast__id_tN14K_form__ktyp_t(&(*dst)->u.KTypRecord); break;
      case 17:
         _fx_free_T2iN14K_form__ktyp_t(&(*dst)->u.KTypArray); break;
      case 18:
         _fx_free_N14K_form__ktyp_t(&(*dst)->u.KTypVector); break;
      case 19:
         _fx_free_N14K_form__ktyp_t(&(*dst)->u.KTypList); break;
      case 20:
         _fx_free_N14K_form__ktyp_t(&(*dst)->u.KTypRef); break;
      default:
         ;
      }
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Ta3N14K_form__atom_t(struct _fx_Ta3N14K_form__atom_t* dst)
{
   _fx_free_N14K_form__atom_t(&dst->t0);
   _fx_free_N14K_form__atom_t(&dst->t1);
   _fx_free_N14K_form__atom_t(&dst->t2);
}

static void _fx_copy_Ta3N14K_form__atom_t(struct _fx_Ta3N14K_form__atom_t* src, struct _fx_Ta3N14K_form__atom_t* dst)
{
   _fx_copy_N14K_form__atom_t(&src->t0, &dst->t0);
   _fx_copy_N14K_form__atom_t(&src->t1, &dst->t1);
   _fx_copy_N14K_form__atom_t(&src->t2, &dst->t2);
}

static void _fx_make_Ta3N14K_form__atom_t(
   struct _fx_N14K_form__atom_t* t0,
   struct _fx_N14K_form__atom_t* t1,
   struct _fx_N14K_form__atom_t* t2,
   struct _fx_Ta3N14K_form__atom_t* fx_result)
{
   _fx_copy_N14K_form__atom_t(t0, &fx_result->t0);
   _fx_copy_N14K_form__atom_t(t1, &fx_result->t1);
   _fx_copy_N14K_form__atom_t(t2, &fx_result->t2);
}

static void _fx_free_N13K_form__dom_t(struct _fx_N13K_form__dom_t* dst)
{
   switch (dst->tag) {
   case 1:
      _fx_free_N14K_form__atom_t(&dst->u.DomainElem); break;
   case 2:
      _fx_free_N14K_form__atom_t(&dst->u.DomainFast); break;
   case 3:
      _fx_free_Ta3N14K_form__atom_t(&dst->u.DomainRange); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_N13K_form__dom_t(struct _fx_N13K_form__dom_t* src, struct _fx_N13K_form__dom_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 1:
      _fx_copy_N14K_form__atom_t(&src->u.DomainElem, &dst->u.DomainElem); break;
   case 2:
      _fx_copy_N14K_form__atom_t(&src->u.DomainFast, &dst->u.DomainFast); break;
   case 3:
      _fx_copy_Ta3N14K_form__atom_t(&src->u.DomainRange, &dst->u.DomainRange); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_T2Nt6option1N14K_form__atom_tR10Ast__loc_t(struct _fx_T2Nt6option1N14K_form__atom_tR10Ast__loc_t* dst)
{
   _fx_free_Nt6option1N14K_form__atom_t(&dst->t0);
}

static void _fx_copy_T2Nt6option1N14K_form__atom_tR10Ast__loc_t(
   struct _fx_T2Nt6option1N14K_form__atom_tR10Ast__loc_t* src,
   struct _fx_T2Nt6option1N14K_form__atom_tR10Ast__loc_t* dst)
{
   _fx_copy_Nt6option1N14K_form__atom_t(&src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2Nt6option1N14K_form__atom_tR10Ast__loc_t(
   struct _fx_Nt6option1N14K_form__atom_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2Nt6option1N14K_form__atom_tR10Ast__loc_t* fx_result)
{
   _fx_copy_Nt6option1N14K_form__atom_t(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__ktyp_t(&dst->t0);
}

static void _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__ktyp_t_data_t* t0,
   struct _fx_R10Ast__loc_t* t1,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = *t1;
}

static void _fx_free_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__atom_t(&dst->t0);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_copy_N14K_form__atom_t(&src->t0, &dst->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__atom_t* t0,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t1,
   struct _fx_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   _fx_copy_N14K_form__atom_t(t0, &fx_result->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N13Ast__binary_t(&dst->t0);
   _fx_free_N14K_form__atom_t(&dst->t1);
   _fx_free_N14K_form__atom_t(&dst->t2);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t3);
}

static void _fx_copy_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   _fx_copy_N14K_form__atom_t(&src->t1, &dst->t1);
   _fx_copy_N14K_form__atom_t(&src->t2, &dst->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void _fx_make_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N13Ast__binary_t_data_t* t0,
   struct _fx_N14K_form__atom_t* t1,
   struct _fx_N14K_form__atom_t* t2,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t3,
   struct _fx_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   _fx_copy_N14K_form__atom_t(t1, &fx_result->t1);
   _fx_copy_N14K_form__atom_t(t2, &fx_result->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__atom_t(&dst->t1);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   _fx_copy_N14K_form__atom_t(&src->t1, &dst->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N12Ast__unary_t* t0,
   struct _fx_N14K_form__atom_t* t1,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t2,
   struct _fx_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   _fx_copy_N14K_form__atom_t(t1, &fx_result->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_LN14K_form__atom_t(struct _fx_LN14K_form__atom_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LN14K_form__atom_t, _fx_free_N14K_form__atom_t);
}

static int _fx_cons_LN14K_form__atom_t(
   struct _fx_N14K_form__atom_t* hd,
   struct _fx_LN14K_form__atom_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN14K_form__atom_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN14K_form__atom_t, _fx_copy_N14K_form__atom_t);
}

static void _fx_free_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LN14K_form__atom_t(&dst->t1);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N13Ast__intrin_t* t0,
   struct _fx_LN14K_form__atom_t_data_t* t1,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t2,
   struct _fx_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T2R9Ast__id_tN14K_form__kexp_t(struct _fx_T2R9Ast__id_tN14K_form__kexp_t* dst)
{
   _fx_free_N14K_form__kexp_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tN14K_form__kexp_t(
   struct _fx_T2R9Ast__id_tN14K_form__kexp_t* src,
   struct _fx_T2R9Ast__id_tN14K_form__kexp_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tN14K_form__kexp_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N14K_form__kexp_t_data_t* t1,
   struct _fx_T2R9Ast__id_tN14K_form__kexp_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LN14K_form__kexp_t(&dst->t0);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_LN14K_form__kexp_t_data_t* t0,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t1,
   struct _fx_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__kexp_t(&dst->t0);
   _fx_free_N14K_form__kexp_t(&dst->t1);
   _fx_free_N14K_form__kexp_t(&dst->t2);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t3);
}

static void _fx_copy_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void _fx_make_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__kexp_t_data_t* t0,
   struct _fx_N14K_form__kexp_t_data_t* t1,
   struct _fx_N14K_form__kexp_t_data_t* t2,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t3,
   struct _fx_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LN14K_form__atom_t(&dst->t1);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_LN14K_form__atom_t_data_t* t1,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t2,
   struct _fx_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LN14K_form__atom_t(&dst->t2);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t3);
}

static void _fx_copy_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   dst->t1 = src->t1;
   FX_COPY_PTR(src->t2, &dst->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void _fx_make_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   int_ t1,
   struct _fx_LN14K_form__atom_t_data_t* t2,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t3,
   struct _fx_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   fx_result->t1 = t1;
   FX_COPY_PTR(t2, &fx_result->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LN14K_form__atom_t(&dst->t0);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_LN14K_form__atom_t_data_t* t0,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t1,
   struct _fx_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LN14K_form__atom_t(&dst->t2);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t3);
}

static void _fx_copy_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   dst->t1 = src->t1;
   FX_COPY_PTR(src->t2, &dst->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void _fx_make_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_R9Ast__id_t* t1,
   struct _fx_LN14K_form__atom_t_data_t* t2,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t3,
   struct _fx_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   fx_result->t1 = *t1;
   FX_COPY_PTR(t2, &fx_result->t2);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_LLT2BN14K_form__atom_t(struct _fx_LLT2BN14K_form__atom_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LLT2BN14K_form__atom_t, _fx_free_LT2BN14K_form__atom_t);
}

static int _fx_cons_LLT2BN14K_form__atom_t(
   struct _fx_LT2BN14K_form__atom_t_data_t* hd,
   struct _fx_LLT2BN14K_form__atom_t_data_t* tl,
   bool addref_tl,
   struct _fx_LLT2BN14K_form__atom_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LLT2BN14K_form__atom_t, FX_COPY_PTR);
}

static void _fx_free_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LLT2BN14K_form__atom_t(&dst->t1);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   bool t0,
   struct _fx_LLT2BN14K_form__atom_t_data_t* t1,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t2,
   struct _fx_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LT2BN14K_form__atom_t(&dst->t0);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_LT2BN14K_form__atom_t_data_t* t0,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t1,
   struct _fx_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_LN13K_form__dom_t(struct _fx_LN13K_form__dom_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LN13K_form__dom_t, _fx_free_N13K_form__dom_t);
}

static int _fx_cons_LN13K_form__dom_t(
   struct _fx_N13K_form__dom_t* hd,
   struct _fx_LN13K_form__dom_t_data_t* tl,
   bool addref_tl,
   struct _fx_LN13K_form__dom_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LN13K_form__dom_t, _fx_copy_N13K_form__dom_t);
}

static void _fx_free_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__atom_t(&dst->t0);
   _fx_free_LN13K_form__dom_t(&dst->t3);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t4);
}

static void _fx_copy_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_copy_N14K_form__atom_t(&src->t0, &dst->t0);
   dst->t1 = src->t1;
   dst->t2 = src->t2;
   FX_COPY_PTR(src->t3, &dst->t3);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t4, &dst->t4);
}

static void _fx_make_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__atom_t* t0,
   struct _fx_N13Ast__border_t* t1,
   struct _fx_N18Ast__interpolate_t* t2,
   struct _fx_LN13K_form__dom_t_data_t* t3,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t4,
   struct _fx_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t*
      fx_result)
{
   _fx_copy_N14K_form__atom_t(t0, &fx_result->t0);
   fx_result->t1 = *t1;
   fx_result->t2 = *t2;
   FX_COPY_PTR(t3, &fx_result->t3);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t4, &fx_result->t4);
}

static void _fx_free_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   dst->t1 = src->t1;
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   int_ t1,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t2,
   struct _fx_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   fx_result->t1 = t1;
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t(struct _fx_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__atom_t(&dst->t1);
}

static void _fx_copy_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t(
   struct _fx_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t* src,
   struct _fx_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   _fx_copy_N14K_form__atom_t(&src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N14K_form__atom_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   _fx_copy_N14K_form__atom_t(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T2LN14K_form__kexp_tN14K_form__kexp_t(struct _fx_T2LN14K_form__kexp_tN14K_form__kexp_t* dst)
{
   _fx_free_LN14K_form__kexp_t(&dst->t0);
   _fx_free_N14K_form__kexp_t(&dst->t1);
}

static void _fx_copy_T2LN14K_form__kexp_tN14K_form__kexp_t(
   struct _fx_T2LN14K_form__kexp_tN14K_form__kexp_t* src,
   struct _fx_T2LN14K_form__kexp_tN14K_form__kexp_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2LN14K_form__kexp_tN14K_form__kexp_t(
   struct _fx_LN14K_form__kexp_t_data_t* t0,
   struct _fx_N14K_form__kexp_t_data_t* t1,
   struct _fx_T2LN14K_form__kexp_tN14K_form__kexp_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2LN14K_form__kexp_tN14K_form__kexp_t(struct _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2LN14K_form__kexp_tN14K_form__kexp_t, _fx_free_T2LN14K_form__kexp_tN14K_form__kexp_t);
}

static int _fx_cons_LT2LN14K_form__kexp_tN14K_form__kexp_t(
   struct _fx_T2LN14K_form__kexp_tN14K_form__kexp_t* hd,
   struct _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2LN14K_form__kexp_tN14K_form__kexp_t, _fx_copy_T2LN14K_form__kexp_tN14K_form__kexp_t);
}

static void _fx_free_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_LT2LN14K_form__kexp_tN14K_form__kexp_t(&dst->t0);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_LT2LN14K_form__kexp_tN14K_form__kexp_t_data_t* t0,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t1,
   struct _fx_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__kexp_t(&dst->t0);
   _fx_free_N14K_form__kexp_t(&dst->t1);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t2);
}

static void _fx_copy_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t2, &dst->t2);
}

static void _fx_make_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__kexp_t_data_t* t0,
   struct _fx_N14K_form__kexp_t_data_t* t1,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t2,
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t2, &fx_result->t2);
}

static void _fx_free_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__atom_t(&dst->t0);
   _fx_free_N14K_form__ktyp_t(&dst->t1);
}

static void _fx_copy_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t* dst)
{
   _fx_copy_N14K_form__atom_t(&src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__atom_t* t0,
   struct _fx_N14K_form__ktyp_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   _fx_copy_N14K_form__atom_t(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T2R9Ast__id_tN13K_form__dom_t(struct _fx_T2R9Ast__id_tN13K_form__dom_t* dst)
{
   _fx_free_N13K_form__dom_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_tN13K_form__dom_t(
   struct _fx_T2R9Ast__id_tN13K_form__dom_t* src,
   struct _fx_T2R9Ast__id_tN13K_form__dom_t* dst)
{
   dst->t0 = src->t0;
   _fx_copy_N13K_form__dom_t(&src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_tN13K_form__dom_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N13K_form__dom_t* t1,
   struct _fx_T2R9Ast__id_tN13K_form__dom_t* fx_result)
{
   fx_result->t0 = *t0;
   _fx_copy_N13K_form__dom_t(t1, &fx_result->t1);
}

static void _fx_free_LT2R9Ast__id_tN13K_form__dom_t(struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2R9Ast__id_tN13K_form__dom_t, _fx_free_T2R9Ast__id_tN13K_form__dom_t);
}

static int _fx_cons_LT2R9Ast__id_tN13K_form__dom_t(
   struct _fx_T2R9Ast__id_tN13K_form__dom_t* hd,
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2R9Ast__id_tN13K_form__dom_t, _fx_copy_T2R9Ast__id_tN13K_form__dom_t);
}

static void _fx_free_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t(
   struct _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t* dst)
{
   _fx_free_N14K_form__kexp_t(&dst->t0);
   _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&dst->t1);
   fx_free_list_simple(&dst->t2);
}

static void _fx_copy_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t(
   struct _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t* src,
   struct _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
}

static void _fx_make_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t(
   struct _fx_N14K_form__kexp_t_data_t* t0,
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* t1,
   struct _fx_LR9Ast__id_t_data_t* t2,
   struct _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
}

static void _fx_free_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t(
   struct _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t,
      _fx_free_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t);
}

static int _fx_cons_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t(
   struct _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t* hd,
   struct _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t,
      _fx_copy_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t);
}

static void
   _fx_free_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t*
      dst)
{
   _fx_free_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t(&dst->t0);
   _fx_free_N14K_form__kexp_t(&dst->t1);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t3);
}

static void
   _fx_copy_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t*
      src,
   struct _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t*
      dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t3, &dst->t3);
}

static void
   _fx_make_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t* t0,
   struct _fx_N14K_form__kexp_t_data_t* t1,
   struct _fx_R16Ast__for_flags_t* t2,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t3,
   struct _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t*
      fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t3, &fx_result->t3);
}

static void _fx_free_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t(
   struct _fx_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t* dst)
{
   _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&dst->t0);
   fx_free_list_simple(&dst->t1);
   _fx_free_N14K_form__kexp_t(&dst->t2);
}

static void _fx_copy_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t(
   struct _fx_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t* src,
   struct _fx_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   FX_COPY_PTR(src->t2, &dst->t2);
   dst->t3 = src->t3;
   dst->t4 = src->t4;
}

static void _fx_make_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t(
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* t0,
   struct _fx_LR9Ast__id_t_data_t* t1,
   struct _fx_N14K_form__kexp_t_data_t* t2,
   struct _fx_R16Ast__for_flags_t* t3,
   struct _fx_R10Ast__loc_t* t4,
   struct _fx_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   FX_COPY_PTR(t2, &fx_result->t2);
   fx_result->t3 = *t3;
   fx_result->t4 = *t4;
}

static void _fx_free_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t(
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__kexp_t(&dst->t0);
   _fx_free_N14K_form__kexp_t(&dst->t1);
}

static void _fx_copy_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t(
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t* src,
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t(
   struct _fx_N14K_form__kexp_t_data_t* t0,
   struct _fx_N14K_form__kexp_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_T2ST2N14K_form__ktyp_tR10Ast__loc_t(struct _fx_T2ST2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   fx_free_str(&dst->t0);
   _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&dst->t1);
}

static void _fx_copy_T2ST2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_T2ST2N14K_form__ktyp_tR10Ast__loc_t* src,
   struct _fx_T2ST2N14K_form__ktyp_tR10Ast__loc_t* dst)
{
   fx_copy_str(&src->t0, &dst->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(&src->t1, &dst->t1);
}

static void _fx_make_T2ST2N14K_form__ktyp_tR10Ast__loc_t(
   fx_str_t* t0,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* t1,
   struct _fx_T2ST2N14K_form__ktyp_tR10Ast__loc_t* fx_result)
{
   fx_copy_str(t0, &fx_result->t0);
   _fx_copy_T2N14K_form__ktyp_tR10Ast__loc_t(t1, &fx_result->t1);
}

static void _fx_free_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t(struct _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t* dst)
{
   _fx_free_N14K_form__kexp_t(&dst->t1);
}

static void _fx_copy_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t(
   struct _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t* src,
   struct _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
}

static void _fx_make_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_N14K_form__kexp_t_data_t* t1,
   struct _fx_R10Ast__loc_t* t2,
   struct _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
}

static void _fx_free_N14K_form__kexp_t(struct _fx_N14K_form__kexp_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      switch ((*dst)->tag) {
      case 4:
         _fx_free_T2Nt6option1N14K_form__atom_tR10Ast__loc_t(&(*dst)->u.KExpReturn); break;
      case 5:
         _fx_free_T2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpAtom); break;
      case 6:
         _fx_free_T4N13Ast__binary_tN14K_form__atom_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpBinary);
         break;
      case 7:
         _fx_free_T3N12Ast__unary_tN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpUnary); break;
      case 8:
         _fx_free_T3N13Ast__intrin_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpIntrin); break;
      case 9:
         _fx_free_T2R9Ast__id_tN14K_form__kexp_t(&(*dst)->u.KExpSync); break;
      case 10:
         _fx_free_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpSeq); break;
      case 11:
         _fx_free_T4N14K_form__kexp_tN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpIf);
         break;
      case 12:
         _fx_free_T3R9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpCall); break;
      case 13:
         _fx_free_T4R9Ast__id_tiLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpICall); break;
      case 14:
         _fx_free_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpMkTuple); break;
      case 15:
         _fx_free_T2LN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpMkRecord); break;
      case 16:
         _fx_free_T4R9Ast__id_tR9Ast__id_tLN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpMkClosure); break;
      case 17:
         _fx_free_T3BLLT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpMkArray); break;
      case 18:
         _fx_free_T2LT2BN14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpMkVector); break;
      case 19:
         _fx_free_T5N14K_form__atom_tN13Ast__border_tN18Ast__interpolate_tLN13K_form__dom_tT2N14K_form__ktyp_tR10Ast__loc_t(
            &(*dst)->u.KExpAt);
         break;
      case 20:
         _fx_free_T3R9Ast__id_tiT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpMem); break;
      case 21:
         _fx_free_T3R9Ast__id_tN14K_form__atom_tR10Ast__loc_t(&(*dst)->u.KExpAssign); break;
      case 22:
         _fx_free_T2LT2LN14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpMatch); break;
      case 23:
         _fx_free_T3N14K_form__kexp_tN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpTryCatch); break;
      case 25:
         _fx_free_T3N14K_form__atom_tN14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpCast); break;
      case 26:
         _fx_free_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t(
            &(*dst)->u.KExpMap);
         break;
      case 27:
         _fx_free_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t(
            &(*dst)->u.KExpFor);
         break;
      case 28:
         _fx_free_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t(&(*dst)->u.KExpWhile); break;
      case 29:
         _fx_free_T3N14K_form__kexp_tN14K_form__kexp_tR10Ast__loc_t(&(*dst)->u.KExpDoWhile); break;
      case 30:
         _fx_free_T2ST2N14K_form__ktyp_tR10Ast__loc_t(&(*dst)->u.KExpCCode); break;
      case 31:
         _fx_free_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t(&(*dst)->u.KDefVal); break;
      case 32:
         _fx_free_rR17K_form__kdeffun_t(&(*dst)->u.KDefFun); break;
      case 33:
         _fx_free_rR17K_form__kdefexn_t(&(*dst)->u.KDefExn); break;
      case 34:
         _fx_free_rR21K_form__kdefvariant_t(&(*dst)->u.KDefVariant); break;
      case 35:
         _fx_free_rR23K_form__kdefinterface_t(&(*dst)->u.KDefInterface); break;
      case 36:
         _fx_free_rR17K_form__kdeftyp_t(&(*dst)->u.KDefTyp); break;
      case 37:
         _fx_free_rR25K_form__kdefclosurevars_t(&(*dst)->u.KDefClosureVars); break;
      default:
         ;
      }
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_R14Ast__pragmas_t(struct _fx_R14Ast__pragmas_t* dst)
{
   _fx_free_LT2SR10Ast__loc_t(&dst->pragma_clibs);
}

static void _fx_copy_R14Ast__pragmas_t(struct _fx_R14Ast__pragmas_t* src, struct _fx_R14Ast__pragmas_t* dst)
{
   dst->pragma_cpp = src->pragma_cpp;
   FX_COPY_PTR(src->pragma_clibs, &dst->pragma_clibs);
}

static void _fx_make_R14Ast__pragmas_t(
   bool r_pragma_cpp,
   struct _fx_LT2SR10Ast__loc_t_data_t* r_pragma_clibs,
   struct _fx_R14Ast__pragmas_t* fx_result)
{
   fx_result->pragma_cpp = r_pragma_cpp;
   FX_COPY_PTR(r_pragma_clibs, &fx_result->pragma_clibs);
}

static void _fx_free_R17K_form__kmodule_t(struct _fx_R17K_form__kmodule_t* dst)
{
   fx_free_str(&dst->km_cname);
   _fx_free_LN14K_form__kexp_t(&dst->km_top);
   fx_free_list_simple(&dst->km_deps);
   _fx_free_R14Ast__pragmas_t(&dst->km_pragmas);
}

static void _fx_copy_R17K_form__kmodule_t(struct _fx_R17K_form__kmodule_t* src, struct _fx_R17K_form__kmodule_t* dst)
{
   dst->km_name = src->km_name;
   dst->km_idx = src->km_idx;
   dst->km_toposort_idx = src->km_toposort_idx;
   fx_copy_str(&src->km_cname, &dst->km_cname);
   FX_COPY_PTR(src->km_top, &dst->km_top);
   FX_COPY_PTR(src->km_deps, &dst->km_deps);
   dst->km_skip = src->km_skip;
   dst->km_main = src->km_main;
   _fx_copy_R14Ast__pragmas_t(&src->km_pragmas, &dst->km_pragmas);
}

static void _fx_make_R17K_form__kmodule_t(
   struct _fx_R9Ast__id_t* r_km_name,
   int_ r_km_idx,
   int_ r_km_toposort_idx,
   fx_str_t* r_km_cname,
   struct _fx_LN14K_form__kexp_t_data_t* r_km_top,
   struct _fx_Li_data_t* r_km_deps,
   bool r_km_skip,
   bool r_km_main,
   struct _fx_R14Ast__pragmas_t* r_km_pragmas,
   struct _fx_R17K_form__kmodule_t* fx_result)
{
   fx_result->km_name = *r_km_name;
   fx_result->km_idx = r_km_idx;
   fx_result->km_toposort_idx = r_km_toposort_idx;
   fx_copy_str(r_km_cname, &fx_result->km_cname);
   FX_COPY_PTR(r_km_top, &fx_result->km_top);
   FX_COPY_PTR(r_km_deps, &fx_result->km_deps);
   fx_result->km_skip = r_km_skip;
   fx_result->km_main = r_km_main;
   _fx_copy_R14Ast__pragmas_t(r_km_pragmas, &fx_result->km_pragmas);
}

static void _fx_free_LR17K_form__kmodule_t(struct _fx_LR17K_form__kmodule_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LR17K_form__kmodule_t, _fx_free_R17K_form__kmodule_t);
}

static int _fx_cons_LR17K_form__kmodule_t(
   struct _fx_R17K_form__kmodule_t* hd,
   struct _fx_LR17K_form__kmodule_t_data_t* tl,
   bool addref_tl,
   struct _fx_LR17K_form__kmodule_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LR17K_form__kmodule_t, _fx_copy_R17K_form__kmodule_t);
}

static void _fx_free_R24K_fuse_loops__arr_info_t(struct _fx_R24K_fuse_loops__arr_info_t* dst)
{
   _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&dst->arr_idl);
   _fx_free_N14K_form__kexp_t(&dst->arr_body);
}

static void _fx_copy_R24K_fuse_loops__arr_info_t(
   struct _fx_R24K_fuse_loops__arr_info_t* src,
   struct _fx_R24K_fuse_loops__arr_info_t* dst)
{
   dst->arr_nused = src->arr_nused;
   dst->arr_nused_for = src->arr_nused_for;
   FX_COPY_PTR(src->arr_idl, &dst->arr_idl);
   FX_COPY_PTR(src->arr_body, &dst->arr_body);
   dst->arr_map_flags = src->arr_map_flags;
}

static void _fx_make_R24K_fuse_loops__arr_info_t(
   int_ r_arr_nused,
   int_ r_arr_nused_for,
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* r_arr_idl,
   struct _fx_N14K_form__kexp_t_data_t* r_arr_body,
   struct _fx_R16Ast__for_flags_t* r_arr_map_flags,
   struct _fx_R24K_fuse_loops__arr_info_t* fx_result)
{
   fx_result->arr_nused = r_arr_nused;
   fx_result->arr_nused_for = r_arr_nused_for;
   FX_COPY_PTR(r_arr_idl, &fx_result->arr_idl);
   FX_COPY_PTR(r_arr_body, &fx_result->arr_body);
   fx_result->arr_map_flags = *r_arr_map_flags;
}

static void _fx_free_rR24K_fuse_loops__arr_info_t(struct _fx_rR24K_fuse_loops__arr_info_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rR24K_fuse_loops__arr_info_t, _fx_free_R24K_fuse_loops__arr_info_t);
}

static int _fx_make_rR24K_fuse_loops__arr_info_t(
   struct _fx_R24K_fuse_loops__arr_info_t* arg,
   struct _fx_rR24K_fuse_loops__arr_info_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rR24K_fuse_loops__arr_info_t, _fx_copy_R24K_fuse_loops__arr_info_t);
}

static void _fx_free_T2R9Ast__id_trR24K_fuse_loops__arr_info_t(struct _fx_T2R9Ast__id_trR24K_fuse_loops__arr_info_t* dst)
{
   _fx_free_rR24K_fuse_loops__arr_info_t(&dst->t1);
}

static void _fx_copy_T2R9Ast__id_trR24K_fuse_loops__arr_info_t(
   struct _fx_T2R9Ast__id_trR24K_fuse_loops__arr_info_t* src,
   struct _fx_T2R9Ast__id_trR24K_fuse_loops__arr_info_t* dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2R9Ast__id_trR24K_fuse_loops__arr_info_t(
   struct _fx_R9Ast__id_t* t0,
   struct _fx_rR24K_fuse_loops__arr_info_t_data_t* t1,
   struct _fx_T2R9Ast__id_trR24K_fuse_loops__arr_info_t* fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_Nt6option1T2R9Ast__id_trR24K_fuse_loops__arr_info_t(
   struct _fx_Nt6option1T2R9Ast__id_trR24K_fuse_loops__arr_info_t* dst)
{
   switch (dst->tag) {
   case 2:
      _fx_free_T2R9Ast__id_trR24K_fuse_loops__arr_info_t(&dst->u.Some); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_Nt6option1T2R9Ast__id_trR24K_fuse_loops__arr_info_t(
   struct _fx_Nt6option1T2R9Ast__id_trR24K_fuse_loops__arr_info_t* src,
   struct _fx_Nt6option1T2R9Ast__id_trR24K_fuse_loops__arr_info_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 2:
      _fx_copy_T2R9Ast__id_trR24K_fuse_loops__arr_info_t(&src->u.Some, &dst->u.Some); break;
   default:
      dst->u = src->u;
   }
}

static void _fx_free_Nt6option1rR24K_fuse_loops__arr_info_t(struct _fx_Nt6option1rR24K_fuse_loops__arr_info_t* dst)
{
   switch (dst->tag) {
   case 2:
      _fx_free_rR24K_fuse_loops__arr_info_t(&dst->u.Some); break;
   default:
      ;
   }
   dst->tag = 0;
}

static void _fx_copy_Nt6option1rR24K_fuse_loops__arr_info_t(
   struct _fx_Nt6option1rR24K_fuse_loops__arr_info_t* src,
   struct _fx_Nt6option1rR24K_fuse_loops__arr_info_t* dst)
{
   dst->tag = src->tag;
   switch (src->tag) {
   case 2:
      FX_COPY_PTR(src->u.Some, &dst->u.Some); break;
   default:
      dst->u = src->u;
   }
}

static void
   _fx_free_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t*
      dst)
{
   _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&dst->t1);
   _fx_free_rR24K_fuse_loops__arr_info_t(&dst->t3);
   _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&dst->t4);
}

static void
   _fx_copy_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t*
      src,
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t*
      dst)
{
   dst->t0 = src->t0;
   FX_COPY_PTR(src->t1, &dst->t1);
   dst->t2 = src->t2;
   FX_COPY_PTR(src->t3, &dst->t3);
   FX_COPY_PTR(src->t4, &dst->t4);
}

static void
   _fx_make_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(
   struct _fx_N12Map__color_t* t0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* t1,
   struct _fx_R9Ast__id_t* t2,
   struct _fx_rR24K_fuse_loops__arr_info_t_data_t* t3,
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* t4,
   struct _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t*
      fx_result)
{
   fx_result->t0 = *t0;
   FX_COPY_PTR(t1, &fx_result->t1);
   fx_result->t2 = *t2;
   FX_COPY_PTR(t3, &fx_result->t3);
   FX_COPY_PTR(t4, &fx_result->t4);
}

static void _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t** dst)
{
   if (*dst && FX_DECREF((*dst)->rc) == 1) {
      _fx_free_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(
         &(*dst)->u.Node);
      fx_free(*dst);
   }
   *dst = 0;
}

static void _fx_free_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t(
   struct _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t* dst)
{
   _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&dst->root);
   fx_free_fp(&dst->cmp);
}

static void _fx_copy_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t(
   struct _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t* src,
   struct _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t* dst)
{
   FX_COPY_PTR(src->root, &dst->root);
   FX_COPY_FP(&src->cmp, &dst->cmp);
}

static void _fx_make_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* r_root,
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t* r_cmp,
   struct _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t* fx_result)
{
   FX_COPY_PTR(r_root, &fx_result->root);
   FX_COPY_FP(r_cmp, &fx_result->cmp);
}

static void _fx_free_Rt6Map__t2R9Ast__id_tR9Ast__id_t(struct _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t* dst)
{
   _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&dst->root);
   fx_free_fp(&dst->cmp);
}

static void _fx_copy_Rt6Map__t2R9Ast__id_tR9Ast__id_t(
   struct _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t* src,
   struct _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t* dst)
{
   FX_COPY_PTR(src->root, &dst->root);
   FX_COPY_FP(&src->cmp, &dst->cmp);
}

static void _fx_make_Rt6Map__t2R9Ast__id_tR9Ast__id_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t* r_root,
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t* r_cmp,
   struct _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t* fx_result)
{
   FX_COPY_PTR(r_root, &fx_result->root);
   FX_COPY_FP(r_cmp, &fx_result->cmp);
}

static void _fx_free_T2Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tB(
   struct _fx_T2Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tB* dst)
{
   _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&dst->t0);
}

static void _fx_copy_T2Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tB(
   struct _fx_T2Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tB* src,
   struct _fx_T2Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tB* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tB(
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* t0,
   bool t1,
   struct _fx_T2Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tB* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = t1;
}

static void _fx_free_rRt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t(
   struct _fx_rRt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t** dst)
{
   FX_FREE_REF_IMPL(_fx_rRt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t,
      _fx_free_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t);
}

static int _fx_make_rRt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t(
   struct _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t* arg,
   struct _fx_rRt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t** fx_result)
{
   FX_MAKE_REF_IMPL(_fx_rRt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t,
      _fx_copy_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t);
}

static void _fx_free_T2LT2R9Ast__id_tN13K_form__dom_tN14K_form__kexp_t(
   struct _fx_T2LT2R9Ast__id_tN13K_form__dom_tN14K_form__kexp_t* dst)
{
   _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&dst->t0);
   _fx_free_N14K_form__kexp_t(&dst->t1);
}

static void _fx_copy_T2LT2R9Ast__id_tN13K_form__dom_tN14K_form__kexp_t(
   struct _fx_T2LT2R9Ast__id_tN13K_form__dom_tN14K_form__kexp_t* src,
   struct _fx_T2LT2R9Ast__id_tN13K_form__dom_tN14K_form__kexp_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2LT2R9Ast__id_tN13K_form__dom_tN14K_form__kexp_t(
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* t0,
   struct _fx_N14K_form__kexp_t_data_t* t1,
   struct _fx_T2LT2R9Ast__id_tN13K_form__dom_tN14K_form__kexp_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_LT2R9Ast__id_trR24K_fuse_loops__arr_info_t(
   struct _fx_LT2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t** dst)
{
   FX_FREE_LIST_IMPL(_fx_LT2R9Ast__id_trR24K_fuse_loops__arr_info_t, _fx_free_T2R9Ast__id_trR24K_fuse_loops__arr_info_t);
}

static int _fx_cons_LT2R9Ast__id_trR24K_fuse_loops__arr_info_t(
   struct _fx_T2R9Ast__id_trR24K_fuse_loops__arr_info_t* hd,
   struct _fx_LT2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* tl,
   bool addref_tl,
   struct _fx_LT2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t** fx_result)
{
   FX_MAKE_LIST_IMPL(_fx_LT2R9Ast__id_trR24K_fuse_loops__arr_info_t, _fx_copy_T2R9Ast__id_trR24K_fuse_loops__arr_info_t);
}

static void _fx_free_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t(
   struct _fx_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t* dst)
{
   _fx_free_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&dst->t0);
   _fx_free_LT2R9Ast__id_trR24K_fuse_loops__arr_info_t(&dst->t1);
}

static void _fx_copy_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t(
   struct _fx_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t* src,
   struct _fx_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t* dst)
{
   _fx_copy_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
}

static void _fx_make_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t(
   struct _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t* t0,
   struct _fx_LT2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* t1,
   struct _fx_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t* fx_result)
{
   _fx_copy_Rt6Map__t2R9Ast__id_tR9Ast__id_t(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
}

static void _fx_free_T2Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tB(struct _fx_T2Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tB* dst)
{
   _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&dst->t0);
}

static void _fx_copy_T2Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tB(
   struct _fx_T2Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tB* src,
   struct _fx_T2Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tB* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   dst->t1 = src->t1;
}

static void _fx_make_T2Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tB(
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t* t0,
   bool t1,
   struct _fx_T2Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tB* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   fx_result->t1 = t1;
}

static void _fx_free_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(
   struct _fx_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t* dst)
{
   _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&dst->t0);
   _fx_free_LN14K_form__kexp_t(&dst->t1);
   _fx_free_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&dst->t2);
}

static void _fx_copy_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(
   struct _fx_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t* src,
   struct _fx_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t* dst)
{
   FX_COPY_PTR(src->t0, &dst->t0);
   FX_COPY_PTR(src->t1, &dst->t1);
   _fx_copy_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&src->t2, &dst->t2);
}

static void _fx_make_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* t0,
   struct _fx_LN14K_form__kexp_t_data_t* t1,
   struct _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t* t2,
   struct _fx_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t* fx_result)
{
   FX_COPY_PTR(t0, &fx_result->t0);
   FX_COPY_PTR(t1, &fx_result->t1);
   _fx_copy_Rt6Map__t2R9Ast__id_tR9Ast__id_t(t2, &fx_result->t2);
}

_fx_Nt6option1T2R9Ast__id_trR24K_fuse_loops__arr_info_t _fx_g18K_fuse_loops__None = { 1 };
_fx_Nt6option1rR24K_fuse_loops__arr_info_t _fx_g20K_fuse_loops__None1_ = { 1 };
_fx_Nt6option1FPv2N14K_form__kexp_tR22K_form__k_fold_callb_t _fx_g20K_fuse_loops__None2_ = 0;
_fx_Nt6option1FPN14K_form__atom_t3N14K_form__atom_tR10Ast__loc_tR17K_form__k_callb_t _fx_g20K_fuse_loops__None3_ = 0;
_fx_Nt6option1R9Ast__id_t _fx_g20K_fuse_loops__None4_ = { 1 };
_fx_N12Map__color_t _fx_g17K_fuse_loops__Red = { 1 };
_fx_N12Map__color_t _fx_g19K_fuse_loops__Black = { 2 };
_fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t _fx_g19K_fuse_loops__Empty = 0;
_fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t _fx_g21K_fuse_loops__Empty1_ = 0;
FX_EXTERN_C int _fx_M12K_fuse_loopsFM11fuse_loops_LN14K_form__kexp_t1LN14K_form__kexp_t(
   struct _fx_LN14K_form__kexp_t_data_t* code_0,
   struct _fx_LN14K_form__kexp_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M3AstFM6cmp_idi2RM4id_tRM4id_t(
   struct _fx_R9Ast__id_t* a_0,
   struct _fx_R9Ast__id_t* b_0,
   int_* fx_result,
   void* fx_fv);

FX_EXTERN_C int
   _fx_M12K_fuse_loopsFM7make_fpFPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t1rRt6Map__t2R9Ast__id_trRM10arr_info_t(
   struct _fx_rRt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* arg0,
   struct _fx_FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t* fx_result);

FX_EXTERN_C int _fx_M6K_formFM9fold_kexpv2N14K_form__kexp_tRM14k_fold_callb_t(
   struct _fx_N14K_form__kexp_t_data_t* e_0,
   struct _fx_R22K_form__k_fold_callb_t* callb_0,
   void* fx_fv);

FX_EXTERN_C int _fx_M15K_remove_unusedFM9pure_kexpB1N14K_form__kexp_t(
   struct _fx_N14K_form__kexp_t_data_t* e_0,
   bool* fx_result,
   void* fx_fv);

static int _fx_M12K_fuse_loopsFM11process_idlv3BLT2R9Ast__id_tN13K_form__dom_trRt6Map__t2R9Ast__id_trRM10arr_info_t(
   bool inside_for_0,
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* idl_0,
   struct _fx_rRt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* counters_ref_0,
   void* fx_fv);

FX_EXTERN_C int
   _fx_M12K_fuse_loopsFM7make_fpFPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t1Rt6Map__t2R9Ast__id_trRM10arr_info_t(
   struct _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t* arg0,
   struct _fx_FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t* fx_result);

static int _fx_M12K_fuse_loopsFM12process_atomv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t(
   struct _fx_N14K_form__atom_t* a_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_R22K_form__k_fold_callb_t* callb_0,
   void* fx_fv);

FX_EXTERN_C int _fx_M3AstFM6__eq__B2RM4id_tRM4id_t(
   struct _fx_R9Ast__id_t* a_0,
   struct _fx_R9Ast__id_t* b_0,
   bool* fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M6K_formFM12get_idk_ktypN14K_form__ktyp_t2R9Ast__id_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* n_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_N14K_form__ktyp_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M3AstFM21default_tempval_flagsRM11val_flags_t0(struct _fx_R16Ast__val_flags_t* fx_result, void* fx_fv);

FX_EXTERN_C void _fx_M6K_formFM6AtomIdN14K_form__atom_t1R9Ast__id_t(
   struct _fx_R9Ast__id_t* arg0,
   struct _fx_N14K_form__atom_t* fx_result);

FX_EXTERN_C int _fx_M6K_formFM8KExpAtomN14K_form__kexp_t2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_N14K_form__atom_t* arg0,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* arg1,
   struct _fx_N14K_form__kexp_t_data_t** fx_result);

FX_EXTERN_C int
   _fx_M6K_formFM14create_kdefvalLN14K_form__kexp_t6R9Ast__id_tN14K_form__ktyp_tR16Ast__val_flags_tNt6option1N14K_form__kexp_tLN14K_form__kexp_tR10Ast__loc_t(
   struct _fx_R9Ast__id_t* n_0,
   struct _fx_N14K_form__ktyp_t_data_t* ktyp_0,
   struct _fx_R16Ast__val_flags_t* flags_0,
   struct _fx_Nt6option1N14K_form__kexp_t* e_opt_0,
   struct _fx_LN14K_form__kexp_t_data_t* code_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_LN14K_form__kexp_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M6K_formFM12get_kexp_typN14K_form__ktyp_t1N14K_form__kexp_t(
   struct _fx_N14K_form__kexp_t_data_t* e_0,
   struct _fx_N14K_form__ktyp_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M6K_formFM10rcode2kexpN14K_form__kexp_t2LN14K_form__kexp_tR10Ast__loc_t(
   struct _fx_LN14K_form__kexp_t_data_t* code_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_N14K_form__kexp_t_data_t** fx_result,
   void* fx_fv);

static int _fx_M12K_fuse_loopsFM10fuse_kexp_N14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t(
   struct _fx_N14K_form__kexp_t_data_t* e_0,
   struct _fx_R17K_form__k_callb_t* callb_0,
   struct _fx_N14K_form__kexp_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M6K_formFM9walk_kexpN14K_form__kexp_t2N14K_form__kexp_tRM9k_callb_t(
   struct _fx_N14K_form__kexp_t_data_t* e_0,
   struct _fx_R17K_form__k_callb_t* callb_0,
   struct _fx_N14K_form__kexp_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M6K_formFM9code2kexpN14K_form__kexp_t2LN14K_form__kexp_tR10Ast__loc_t(
   struct _fx_LN14K_form__kexp_t_data_t* code_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_N14K_form__kexp_t_data_t** fx_result,
   void* fx_fv);

FX_EXTERN_C int _fx_M6K_formFM7KExpNopN14K_form__kexp_t1R10Ast__loc_t(
   struct _fx_R10Ast__loc_t* arg0,
   struct _fx_N14K_form__kexp_t_data_t** fx_result);

FX_EXTERN_C int
   _fx_M6K_formFM7KExpForN14K_form__kexp_t5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t(
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* arg0,
   struct _fx_LR9Ast__id_t_data_t* arg1,
   struct _fx_N14K_form__kexp_t_data_t* arg2,
   struct _fx_R16Ast__for_flags_t* arg3,
   struct _fx_R10Ast__loc_t* arg4,
   struct _fx_N14K_form__kexp_t_data_t** fx_result);

FX_EXTERN_C int
   _fx_M6K_formFM7KExpMapN14K_form__kexp_t4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t(
   struct _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t_data_t* arg0,
   struct _fx_N14K_form__kexp_t_data_t* arg1,
   struct _fx_R16Ast__for_flags_t* arg2,
   struct _fx_T2N14K_form__ktyp_tR10Ast__loc_t* arg3,
   struct _fx_N14K_form__kexp_t_data_t** fx_result);

typedef struct {
   int_ rc;
   fx_free_t free_f;
   struct _fx_rRt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* t0;
} _fx_M12K_fuse_loopsFM12process_atomv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t_cldata_t;

FX_EXTERN_C void _fx_free_M12K_fuse_loopsFM12process_atomv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t(
   _fx_M12K_fuse_loopsFM12process_atomv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t_cldata_t* dst)
{
   _fx_free_rRt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&dst->t0);
   fx_free(dst);
}

typedef struct {
   int_ rc;
   fx_free_t free_f;
   struct _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t t0;
} _fx_M12K_fuse_loopsFM10fuse_kexp_N14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t_cldata_t;

FX_EXTERN_C void _fx_free_M12K_fuse_loopsFM10fuse_kexp_N14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t(
   _fx_M12K_fuse_loopsFM10fuse_kexp_N14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t_cldata_t* dst)
{
   _fx_free_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&dst->t0);
   fx_free(dst);
}

FX_EXTERN_C void _fx_M12K_fuse_loopsFM4SomeNt6option1T2R9Ast__id_trRM10arr_info_t1T2R9Ast__id_trRM10arr_info_t(
   struct _fx_T2R9Ast__id_trR24K_fuse_loops__arr_info_t* arg0,
   struct _fx_Nt6option1T2R9Ast__id_trR24K_fuse_loops__arr_info_t* fx_result)
{
   fx_result->tag = 2;
   _fx_copy_T2R9Ast__id_trR24K_fuse_loops__arr_info_t(arg0, &fx_result->u.Some);
}

FX_EXTERN_C void _fx_M12K_fuse_loopsFM4SomeNt6option1rRM10arr_info_t1rRM10arr_info_t(
   struct _fx_rR24K_fuse_loops__arr_info_t_data_t* arg0,
   struct _fx_Nt6option1rR24K_fuse_loops__arr_info_t* fx_result)
{
   fx_result->tag = 2;
   FX_COPY_PTR(arg0, &fx_result->u.Some);
}

FX_EXTERN_C void _fx_M12K_fuse_loopsFM4SomeNt6option1N14K_form__kexp_t1N14K_form__kexp_t(
   struct _fx_N14K_form__kexp_t_data_t* arg0,
   struct _fx_Nt6option1N14K_form__kexp_t* fx_result)
{
   fx_result->tag = 2;
   FX_COPY_PTR(arg0, &fx_result->u.Some);
}

FX_EXTERN_C int
   _fx_M12K_fuse_loopsFM4SomeNt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t(
   struct _fx_FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t* arg0,
   struct _fx_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t);
   FX_COPY_FP(arg0, &v->u.Some);
   return 0;
}

FX_EXTERN_C int
   _fx_M12K_fuse_loopsFM4SomeNt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t(
   struct _fx_FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t* arg0,
   struct _fx_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t);
   FX_COPY_FP(arg0, &v->u.Some);
   return 0;
}

FX_EXTERN_C int
   _fx_M12K_fuse_loopsFM4SomeNt6option1FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t1FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t(
   struct _fx_FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t* arg0,
   struct _fx_Nt6option1FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt6option1FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t);
   FX_COPY_FP(arg0, &v->u.Some);
   return 0;
}

FX_EXTERN_C int
   _fx_M12K_fuse_loopsFM4SomeNt6option1FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t1FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t(
   struct _fx_FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t* arg0,
   struct _fx_Nt6option1FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt6option1FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t);
   FX_COPY_FP(arg0, &v->u.Some);
   return 0;
}

FX_EXTERN_C void _fx_M12K_fuse_loopsFM4SomeNt6option1R9Ast__id_t1R9Ast__id_t(
   struct _fx_R9Ast__id_t* arg0,
   struct _fx_Nt6option1R9Ast__id_t* fx_result)
{
   fx_result->tag = 2;
   fx_result->u.Some = *arg0;
}

FX_EXTERN_C int
   _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_trRM10arr_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
   struct _fx_N12Map__color_t* arg0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* arg1,
   struct _fx_R9Ast__id_t* arg2,
   struct _fx_rR24K_fuse_loops__arr_info_t_data_t* arg3,
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* arg4,
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t);
   v->u.Node.t0 = *arg0;
   FX_COPY_PTR(arg1, &v->u.Node.t1);
   v->u.Node.t2 = *arg2;
   FX_COPY_PTR(arg3, &v->u.Node.t3);
   FX_COPY_PTR(arg4, &v->u.Node.t4);
   return 0;
}

FX_EXTERN_C int
   _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_tR9Ast__id_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
   struct _fx_N12Map__color_t* arg0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t* arg1,
   struct _fx_R9Ast__id_t* arg2,
   struct _fx_R9Ast__id_t* arg3,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t* arg4,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t** fx_result)
{
   FX_MAKE_RECURSIVE_VARIANT_IMPL_START(_fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t);
   v->u.Node.t0 = *arg0;
   FX_COPY_PTR(arg1, &v->u.Node.t1);
   v->u.Node.t2 = *arg2;
   v->u.Node.t3 = *arg3;
   FX_COPY_PTR(arg4, &v->u.Node.t4);
   return 0;
}

FX_EXTERN_C int _fx_M12K_fuse_loopsFM5emptyRt6Map__t2R9Ast__id_trRM10arr_info_t1FPi2R9Ast__id_tR9Ast__id_t(
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t* cmp_0,
   struct _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t* fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   _fx_make_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t(_fx_g19K_fuse_loops__Empty, cmp_0, fx_result);
   return fx_status;
}

FX_EXTERN_C int
   _fx_M12K_fuse_loopsFM12balance_leftNt11Map__tree_t2R9Ast__id_trRM10arr_info_t4Nt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* l_0,
   struct _fx_R9Ast__id_t* xk_0,
   struct _fx_rR24K_fuse_loops__arr_info_t_data_t* xd_0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* r_0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   if ((l_0 != 0) + 1 == 2) {
      _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t*
         vcase_0 = &l_0->u.Node;
      if (vcase_0->t0.tag == 1) {
         _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_0 = vcase_0->t1;
         if ((v_0 != 0) + 1 == 2) {
            _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t*
               vcase_1 = &v_0->u.Node;
            if (vcase_1->t0.tag == 1) {
               _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_1 = 0;
               _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_2 = 0;
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_trRM10arr_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
                     &_fx_g19K_fuse_loops__Black, vcase_1->t1, &vcase_1->t2, vcase_1->t3, vcase_1->t4, &v_1), _fx_catch_0);
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_trRM10arr_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
                     &_fx_g19K_fuse_loops__Black, vcase_0->t4, xk_0, xd_0, r_0, &v_2), _fx_catch_0);
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_trRM10arr_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
                     &_fx_g17K_fuse_loops__Red, v_1, &vcase_0->t2, vcase_0->t3, v_2, fx_result), _fx_catch_0);

            _fx_catch_0: ;
               if (v_2) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_2);
               }
               if (v_1) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_1);
               }
               goto _fx_endmatch_0;
            }
         }
      }
   }
   if ((l_0 != 0) + 1 == 2) {
      _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t*
         vcase_2 = &l_0->u.Node;
      if (vcase_2->t0.tag == 1) {
         _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_3 = vcase_2->t4;
         if ((v_3 != 0) + 1 == 2) {
            _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t*
               vcase_3 = &v_3->u.Node;
            if (vcase_3->t0.tag == 1) {
               _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_4 = 0;
               _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_5 = 0;
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_trRM10arr_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
                     &_fx_g19K_fuse_loops__Black, vcase_2->t1, &vcase_2->t2, vcase_2->t3, vcase_3->t1, &v_4), _fx_catch_1);
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_trRM10arr_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
                     &_fx_g19K_fuse_loops__Black, vcase_3->t4, xk_0, xd_0, r_0, &v_5), _fx_catch_1);
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_trRM10arr_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
                     &_fx_g17K_fuse_loops__Red, v_4, &vcase_3->t2, vcase_3->t3, v_5, fx_result), _fx_catch_1);

            _fx_catch_1: ;
               if (v_5) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_5);
               }
               if (v_4) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_4);
               }
               goto _fx_endmatch_0;
            }
         }
      }
   }
   FX_CALL(
      _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_trRM10arr_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
         &_fx_g19K_fuse_loops__Black, l_0, xk_0, xd_0, r_0, fx_result), _fx_catch_2);

_fx_catch_2: ;

_fx_endmatch_0: ;
   return fx_status;
}

FX_EXTERN_C int
   _fx_M12K_fuse_loopsFM12balance_leftNt11Map__tree_t2R9Ast__id_tR9Ast__id_t4Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t* l_0,
   struct _fx_R9Ast__id_t* xk_0,
   struct _fx_R9Ast__id_t* xd_0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t* r_0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   if ((l_0 != 0) + 1 == 2) {
      _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t*
         vcase_0 = &l_0->u.Node;
      if (vcase_0->t0.tag == 1) {
         _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_0 = vcase_0->t1;
         if ((v_0 != 0) + 1 == 2) {
            _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t*
               vcase_1 = &v_0->u.Node;
            if (vcase_1->t0.tag == 1) {
               _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_1 = 0;
               _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_2 = 0;
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_tR9Ast__id_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
                     &_fx_g19K_fuse_loops__Black, vcase_1->t1, &vcase_1->t2, &vcase_1->t3, vcase_1->t4, &v_1), _fx_catch_0);
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_tR9Ast__id_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
                     &_fx_g19K_fuse_loops__Black, vcase_0->t4, xk_0, xd_0, r_0, &v_2), _fx_catch_0);
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_tR9Ast__id_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
                     &_fx_g17K_fuse_loops__Red, v_1, &vcase_0->t2, &vcase_0->t3, v_2, fx_result), _fx_catch_0);

            _fx_catch_0: ;
               if (v_2) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&v_2);
               }
               if (v_1) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&v_1);
               }
               goto _fx_endmatch_0;
            }
         }
      }
   }
   if ((l_0 != 0) + 1 == 2) {
      _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t*
         vcase_2 = &l_0->u.Node;
      if (vcase_2->t0.tag == 1) {
         _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_3 = vcase_2->t4;
         if ((v_3 != 0) + 1 == 2) {
            _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t*
               vcase_3 = &v_3->u.Node;
            if (vcase_3->t0.tag == 1) {
               _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_4 = 0;
               _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_5 = 0;
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_tR9Ast__id_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
                     &_fx_g19K_fuse_loops__Black, vcase_2->t1, &vcase_2->t2, &vcase_2->t3, vcase_3->t1, &v_4), _fx_catch_1);
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_tR9Ast__id_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
                     &_fx_g19K_fuse_loops__Black, vcase_3->t4, xk_0, xd_0, r_0, &v_5), _fx_catch_1);
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_tR9Ast__id_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
                     &_fx_g17K_fuse_loops__Red, v_4, &vcase_3->t2, &vcase_3->t3, v_5, fx_result), _fx_catch_1);

            _fx_catch_1: ;
               if (v_5) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&v_5);
               }
               if (v_4) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&v_4);
               }
               goto _fx_endmatch_0;
            }
         }
      }
   }
   FX_CALL(
      _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_tR9Ast__id_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
         &_fx_g19K_fuse_loops__Black, l_0, xk_0, xd_0, r_0, fx_result), _fx_catch_2);

_fx_catch_2: ;

_fx_endmatch_0: ;
   return fx_status;
}

FX_EXTERN_C int
   _fx_M12K_fuse_loopsFM13balance_rightNt11Map__tree_t2R9Ast__id_trRM10arr_info_t4Nt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* l_0,
   struct _fx_R9Ast__id_t* xk_0,
   struct _fx_rR24K_fuse_loops__arr_info_t_data_t* xd_0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* r_0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   if ((r_0 != 0) + 1 == 2) {
      _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t*
         vcase_0 = &r_0->u.Node;
      if (vcase_0->t0.tag == 1) {
         _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_0 = vcase_0->t1;
         if ((v_0 != 0) + 1 == 2) {
            _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t*
               vcase_1 = &v_0->u.Node;
            if (vcase_1->t0.tag == 1) {
               _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_1 = 0;
               _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_2 = 0;
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_trRM10arr_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
                     &_fx_g19K_fuse_loops__Black, l_0, xk_0, xd_0, vcase_1->t1, &v_1), _fx_catch_0);
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_trRM10arr_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
                     &_fx_g19K_fuse_loops__Black, vcase_1->t4, &vcase_0->t2, vcase_0->t3, vcase_0->t4, &v_2), _fx_catch_0);
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_trRM10arr_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
                     &_fx_g17K_fuse_loops__Red, v_1, &vcase_1->t2, vcase_1->t3, v_2, fx_result), _fx_catch_0);

            _fx_catch_0: ;
               if (v_2) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_2);
               }
               if (v_1) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_1);
               }
               goto _fx_endmatch_0;
            }
         }
      }
   }
   if ((r_0 != 0) + 1 == 2) {
      _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t*
         vcase_2 = &r_0->u.Node;
      if (vcase_2->t0.tag == 1) {
         _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_3 = vcase_2->t4;
         if ((v_3 != 0) + 1 == 2) {
            _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t*
               vcase_3 = &v_3->u.Node;
            if (vcase_3->t0.tag == 1) {
               _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_4 = 0;
               _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_5 = 0;
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_trRM10arr_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
                     &_fx_g19K_fuse_loops__Black, l_0, xk_0, xd_0, vcase_2->t1, &v_4), _fx_catch_1);
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_trRM10arr_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
                     &_fx_g19K_fuse_loops__Black, vcase_3->t1, &vcase_3->t2, vcase_3->t3, vcase_3->t4, &v_5), _fx_catch_1);
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_trRM10arr_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
                     &_fx_g17K_fuse_loops__Red, v_4, &vcase_2->t2, vcase_2->t3, v_5, fx_result), _fx_catch_1);

            _fx_catch_1: ;
               if (v_5) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_5);
               }
               if (v_4) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_4);
               }
               goto _fx_endmatch_0;
            }
         }
      }
   }
   FX_CALL(
      _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_trRM10arr_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
         &_fx_g19K_fuse_loops__Black, l_0, xk_0, xd_0, r_0, fx_result), _fx_catch_2);

_fx_catch_2: ;

_fx_endmatch_0: ;
   return fx_status;
}

FX_EXTERN_C int
   _fx_M12K_fuse_loopsFM13balance_rightNt11Map__tree_t2R9Ast__id_tR9Ast__id_t4Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t* l_0,
   struct _fx_R9Ast__id_t* xk_0,
   struct _fx_R9Ast__id_t* xd_0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t* r_0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   if ((r_0 != 0) + 1 == 2) {
      _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t*
         vcase_0 = &r_0->u.Node;
      if (vcase_0->t0.tag == 1) {
         _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_0 = vcase_0->t1;
         if ((v_0 != 0) + 1 == 2) {
            _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t*
               vcase_1 = &v_0->u.Node;
            if (vcase_1->t0.tag == 1) {
               _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_1 = 0;
               _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_2 = 0;
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_tR9Ast__id_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
                     &_fx_g19K_fuse_loops__Black, l_0, xk_0, xd_0, vcase_1->t1, &v_1), _fx_catch_0);
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_tR9Ast__id_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
                     &_fx_g19K_fuse_loops__Black, vcase_1->t4, &vcase_0->t2, &vcase_0->t3, vcase_0->t4, &v_2), _fx_catch_0);
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_tR9Ast__id_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
                     &_fx_g17K_fuse_loops__Red, v_1, &vcase_1->t2, &vcase_1->t3, v_2, fx_result), _fx_catch_0);

            _fx_catch_0: ;
               if (v_2) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&v_2);
               }
               if (v_1) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&v_1);
               }
               goto _fx_endmatch_0;
            }
         }
      }
   }
   if ((r_0 != 0) + 1 == 2) {
      _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t*
         vcase_2 = &r_0->u.Node;
      if (vcase_2->t0.tag == 1) {
         _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_3 = vcase_2->t4;
         if ((v_3 != 0) + 1 == 2) {
            _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t*
               vcase_3 = &v_3->u.Node;
            if (vcase_3->t0.tag == 1) {
               _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_4 = 0;
               _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_5 = 0;
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_tR9Ast__id_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
                     &_fx_g19K_fuse_loops__Black, l_0, xk_0, xd_0, vcase_2->t1, &v_4), _fx_catch_1);
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_tR9Ast__id_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
                     &_fx_g19K_fuse_loops__Black, vcase_3->t1, &vcase_3->t2, &vcase_3->t3, vcase_3->t4, &v_5), _fx_catch_1);
               FX_CALL(
                  _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_tR9Ast__id_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
                     &_fx_g17K_fuse_loops__Red, v_4, &vcase_2->t2, &vcase_2->t3, v_5, fx_result), _fx_catch_1);

            _fx_catch_1: ;
               if (v_5) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&v_5);
               }
               if (v_4) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&v_4);
               }
               goto _fx_endmatch_0;
            }
         }
      }
   }
   FX_CALL(
      _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_tR9Ast__id_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
         &_fx_g19K_fuse_loops__Black, l_0, xk_0, xd_0, r_0, fx_result), _fx_catch_2);

_fx_catch_2: ;

_fx_endmatch_0: ;
   return fx_status;
}

FX_EXTERN_C int
   _fx_M12K_fuse_loopsFM12add_to_tree_Nt11Map__tree_t2R9Ast__id_trRM10arr_info_t4Nt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tFPi2R9Ast__id_tR9Ast__id_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* t_0,
   struct _fx_R9Ast__id_t* xk_0,
   struct _fx_rR24K_fuse_loops__arr_info_t_data_t* xd_0,
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t* cmp_0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   int tag_0 = (t_0 != 0) + 1;
   if (tag_0 == 2) {
      _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t*
         vcase_0 = &t_0->u.Node;
      if (vcase_0->t0.tag == 1) {
         _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_0 = 0;
         _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_1 = 0;
         _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t r_0 = vcase_0->t4;
         _fx_rR24K_fuse_loops__arr_info_t yd_0 = vcase_0->t3;
         _fx_R9Ast__id_t* yk_0 = &vcase_0->t2;
         _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t l_0 = vcase_0->t1;
         int_ c_0;
         FX_CALL(cmp_0->fp(xk_0, yk_0, &c_0, cmp_0->fcv), _fx_catch_0);
         if (c_0 < 0) {
            FX_CALL(
               _fx_M12K_fuse_loopsFM12add_to_tree_Nt11Map__tree_t2R9Ast__id_trRM10arr_info_t4Nt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tFPi2R9Ast__id_tR9Ast__id_t(
                  l_0, xk_0, xd_0, cmp_0, &v_0, 0), _fx_catch_0);
            FX_CALL(
               _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_trRM10arr_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
                  &_fx_g17K_fuse_loops__Red, v_0, yk_0, yd_0, r_0, fx_result), _fx_catch_0);
         }
         else if (c_0 > 0) {
            FX_CALL(
               _fx_M12K_fuse_loopsFM12add_to_tree_Nt11Map__tree_t2R9Ast__id_trRM10arr_info_t4Nt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tFPi2R9Ast__id_tR9Ast__id_t(
                  r_0, xk_0, xd_0, cmp_0, &v_1, 0), _fx_catch_0);
            FX_CALL(
               _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_trRM10arr_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
                  &_fx_g17K_fuse_loops__Red, l_0, yk_0, yd_0, v_1, fx_result), _fx_catch_0);
         }
         else {
            FX_CALL(
               _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_trRM10arr_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
                  &_fx_g17K_fuse_loops__Red, l_0, xk_0, xd_0, r_0, fx_result), _fx_catch_0);
         }

      _fx_catch_0: ;
         if (v_1) {
            _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_1);
         }
         if (v_0) {
            _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_0);
         }
         goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 2) {
      _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t*
         vcase_1 = &t_0->u.Node;
      if (vcase_1->t0.tag == 2) {
         _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_2 = 0;
         _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_3 = 0;
         _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t r_1 = vcase_1->t4;
         _fx_rR24K_fuse_loops__arr_info_t yd_1 = vcase_1->t3;
         _fx_R9Ast__id_t* yk_1 = &vcase_1->t2;
         _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t l_1 = vcase_1->t1;
         int_ c_1;
         FX_CALL(cmp_0->fp(xk_0, yk_1, &c_1, cmp_0->fcv), _fx_catch_1);
         if (c_1 < 0) {
            FX_CALL(
               _fx_M12K_fuse_loopsFM12add_to_tree_Nt11Map__tree_t2R9Ast__id_trRM10arr_info_t4Nt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tFPi2R9Ast__id_tR9Ast__id_t(
                  l_1, xk_0, xd_0, cmp_0, &v_2, 0), _fx_catch_1);
            FX_CALL(
               _fx_M12K_fuse_loopsFM12balance_leftNt11Map__tree_t2R9Ast__id_trRM10arr_info_t4Nt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
                  v_2, yk_1, yd_1, r_1, fx_result, 0), _fx_catch_1);
         }
         else if (c_1 > 0) {
            FX_CALL(
               _fx_M12K_fuse_loopsFM12add_to_tree_Nt11Map__tree_t2R9Ast__id_trRM10arr_info_t4Nt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tFPi2R9Ast__id_tR9Ast__id_t(
                  r_1, xk_0, xd_0, cmp_0, &v_3, 0), _fx_catch_1);
            FX_CALL(
               _fx_M12K_fuse_loopsFM13balance_rightNt11Map__tree_t2R9Ast__id_trRM10arr_info_t4Nt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
                  l_1, yk_1, yd_1, v_3, fx_result, 0), _fx_catch_1);
         }
         else {
            FX_CALL(
               _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_trRM10arr_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
                  &_fx_g19K_fuse_loops__Black, l_1, xk_0, xd_0, r_1, fx_result), _fx_catch_1);
         }

      _fx_catch_1: ;
         if (v_3) {
            _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_3);
         }
         if (v_2) {
            _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_2);
         }
         goto _fx_endmatch_0;
      }
   }
   FX_CALL(
      _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_trRM10arr_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
         &_fx_g17K_fuse_loops__Red, _fx_g19K_fuse_loops__Empty, xk_0, xd_0, _fx_g19K_fuse_loops__Empty, fx_result),
      _fx_catch_2);

_fx_catch_2: ;

_fx_endmatch_0: ;

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int
   _fx_M12K_fuse_loopsFM12add_to_tree_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t4Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tFPi2R9Ast__id_tR9Ast__id_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t* t_0,
   struct _fx_R9Ast__id_t* xk_0,
   struct _fx_R9Ast__id_t* xd_0,
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t* cmp_0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   int tag_0 = (t_0 != 0) + 1;
   if (tag_0 == 2) {
      _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t*
         vcase_0 = &t_0->u.Node;
      if (vcase_0->t0.tag == 1) {
         _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_0 = 0;
         _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_1 = 0;
         _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t r_0 = vcase_0->t4;
         _fx_R9Ast__id_t* yd_0 = &vcase_0->t3;
         _fx_R9Ast__id_t* yk_0 = &vcase_0->t2;
         _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t l_0 = vcase_0->t1;
         int_ c_0;
         FX_CALL(cmp_0->fp(xk_0, yk_0, &c_0, cmp_0->fcv), _fx_catch_0);
         if (c_0 < 0) {
            FX_CALL(
               _fx_M12K_fuse_loopsFM12add_to_tree_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t4Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tFPi2R9Ast__id_tR9Ast__id_t(
                  l_0, xk_0, xd_0, cmp_0, &v_0, 0), _fx_catch_0);
            FX_CALL(
               _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_tR9Ast__id_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
                  &_fx_g17K_fuse_loops__Red, v_0, yk_0, yd_0, r_0, fx_result), _fx_catch_0);
         }
         else if (c_0 > 0) {
            FX_CALL(
               _fx_M12K_fuse_loopsFM12add_to_tree_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t4Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tFPi2R9Ast__id_tR9Ast__id_t(
                  r_0, xk_0, xd_0, cmp_0, &v_1, 0), _fx_catch_0);
            FX_CALL(
               _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_tR9Ast__id_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
                  &_fx_g17K_fuse_loops__Red, l_0, yk_0, yd_0, v_1, fx_result), _fx_catch_0);
         }
         else {
            FX_CALL(
               _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_tR9Ast__id_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
                  &_fx_g17K_fuse_loops__Red, l_0, xk_0, xd_0, r_0, fx_result), _fx_catch_0);
         }

      _fx_catch_0: ;
         if (v_1) {
            _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&v_1);
         }
         if (v_0) {
            _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&v_0);
         }
         goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 2) {
      _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t*
         vcase_1 = &t_0->u.Node;
      if (vcase_1->t0.tag == 2) {
         _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_2 = 0;
         _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_3 = 0;
         _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t r_1 = vcase_1->t4;
         _fx_R9Ast__id_t* yd_1 = &vcase_1->t3;
         _fx_R9Ast__id_t* yk_1 = &vcase_1->t2;
         _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t l_1 = vcase_1->t1;
         int_ c_1;
         FX_CALL(cmp_0->fp(xk_0, yk_1, &c_1, cmp_0->fcv), _fx_catch_1);
         if (c_1 < 0) {
            FX_CALL(
               _fx_M12K_fuse_loopsFM12add_to_tree_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t4Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tFPi2R9Ast__id_tR9Ast__id_t(
                  l_1, xk_0, xd_0, cmp_0, &v_2, 0), _fx_catch_1);
            FX_CALL(
               _fx_M12K_fuse_loopsFM12balance_leftNt11Map__tree_t2R9Ast__id_tR9Ast__id_t4Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
                  v_2, yk_1, yd_1, r_1, fx_result, 0), _fx_catch_1);
         }
         else if (c_1 > 0) {
            FX_CALL(
               _fx_M12K_fuse_loopsFM12add_to_tree_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t4Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tFPi2R9Ast__id_tR9Ast__id_t(
                  r_1, xk_0, xd_0, cmp_0, &v_3, 0), _fx_catch_1);
            FX_CALL(
               _fx_M12K_fuse_loopsFM13balance_rightNt11Map__tree_t2R9Ast__id_tR9Ast__id_t4Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
                  l_1, yk_1, yd_1, v_3, fx_result, 0), _fx_catch_1);
         }
         else {
            FX_CALL(
               _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_tR9Ast__id_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
                  &_fx_g19K_fuse_loops__Black, l_1, xk_0, xd_0, r_1, fx_result), _fx_catch_1);
         }

      _fx_catch_1: ;
         if (v_3) {
            _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&v_3);
         }
         if (v_2) {
            _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&v_2);
         }
         goto _fx_endmatch_0;
      }
   }
   FX_CALL(
      _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_tR9Ast__id_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
         &_fx_g17K_fuse_loops__Red, _fx_g21K_fuse_loops__Empty1_, xk_0, xd_0, _fx_g21K_fuse_loops__Empty1_, fx_result),
      _fx_catch_2);

_fx_catch_2: ;

_fx_endmatch_0: ;

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int
   _fx_M12K_fuse_loopsFM3addRt6Map__t2R9Ast__id_trRM10arr_info_t3Rt6Map__t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_t(
   struct _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t* m_0,
   struct _fx_R9Ast__id_t* xk_0,
   struct _fx_rR24K_fuse_loops__arr_info_t_data_t* xd_0,
   struct _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t* fx_result,
   void* fx_fv)
{
   _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_0 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t v_1 = {0};
   _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_2 = 0;
   _fx_T2Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tB v_3 = {0};
   _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t new_root_0 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t v_4 = {0};
   int fx_status = 0;
   FX_COPY_PTR(m_0->root, &v_0);
   FX_COPY_FP(&m_0->cmp, &v_1);
   FX_CALL(
      _fx_M12K_fuse_loopsFM12add_to_tree_Nt11Map__tree_t2R9Ast__id_trRM10arr_info_t4Nt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tFPi2R9Ast__id_tR9Ast__id_t(
         v_0, xk_0, xd_0, &v_1, &v_2, 0), _fx_cleanup);
   if ((v_2 != 0) + 1 == 2) {
      _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t*
         vcase_0 = &v_2->u.Node;
      if (vcase_0->t0.tag == 1) {
         _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_5 = 0;
         FX_CALL(
            _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_trRM10arr_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
               &_fx_g19K_fuse_loops__Black, vcase_0->t1, &vcase_0->t2, vcase_0->t3, vcase_0->t4, &v_5), _fx_catch_0);
         _fx_make_T2Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tB(v_5, false, &v_3);

      _fx_catch_0: ;
         if (v_5) {
            _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_5);
         }
         goto _fx_endmatch_0;
      }
   }
   _fx_make_T2Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tB(v_2, true, &v_3);

_fx_endmatch_0: ;
   FX_CHECK_EXN(_fx_cleanup);
   FX_COPY_PTR(v_3.t0, &new_root_0);
   FX_COPY_FP(&m_0->cmp, &v_4);
   _fx_make_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t(new_root_0, &v_4, fx_result);

_fx_cleanup: ;
   if (v_0) {
      _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_0);
   }
   FX_FREE_FP(&v_1);
   if (v_2) {
      _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_2);
   }
   _fx_free_T2Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tB(&v_3);
   if (new_root_0) {
      _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&new_root_0);
   }
   FX_FREE_FP(&v_4);
   return fx_status;
}

FX_EXTERN_C int
   _fx_M12K_fuse_loopsFM7filter_Nt11Map__tree_t2R9Ast__id_trRM10arr_info_t4Nt11Map__tree_t2R9Ast__id_trRM10arr_info_tFPB2R9Ast__id_trRM10arr_info_tFPi2R9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* t_0,
   struct _fx_FPB2R9Ast__id_trR24K_fuse_loops__arr_info_t* f_0,
   struct _fx_FPi2R9Ast__id_tR9Ast__id_t* cmp_0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* res_0,
   struct _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t result_0 = 0;
   _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t t_1 = 0;
   _fx_FPB2R9Ast__id_trR24K_fuse_loops__arr_info_t f_1 = {0};
   _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_1 = {0};
   _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t res_1 = 0;
   int fx_status = 0;
   FX_CALL(fx_check_stack(), _fx_cleanup);
   FX_COPY_PTR(t_0, &t_1);
   FX_COPY_FP(f_0, &f_1);
   FX_COPY_FP(cmp_0, &cmp_1);
   FX_COPY_PTR(res_0, &res_1);
   for (;;) {
      _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t t_2 = 0;
      _fx_FPB2R9Ast__id_trR24K_fuse_loops__arr_info_t f_2 = {0};
      _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_2 = {0};
      _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t res_2 = 0;
      FX_COPY_PTR(t_1, &t_2);
      FX_COPY_FP(&f_1, &f_2);
      FX_COPY_FP(&cmp_1, &cmp_2);
      FX_COPY_PTR(res_1, &res_2);
      if ((t_2 != 0) + 1 == 2) {
         _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t res_3 = 0;
         _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t res_4 = 0;
         _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_0 = 0;
         _fx_T2Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tB v_1 = {0};
         _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t*
            vcase_0 = &t_2->u.Node;
         _fx_rR24K_fuse_loops__arr_info_t xd_0 = vcase_0->t3;
         _fx_R9Ast__id_t* xk_0 = &vcase_0->t2;
         FX_CALL(
            _fx_M12K_fuse_loopsFM7filter_Nt11Map__tree_t2R9Ast__id_trRM10arr_info_t4Nt11Map__tree_t2R9Ast__id_trRM10arr_info_tFPB2R9Ast__id_trRM10arr_info_tFPi2R9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
               vcase_0->t1, &f_2, &cmp_2, res_2, &res_3, 0), _fx_catch_1);
         bool v_2;
         FX_CALL(f_2.fp(xk_0, xd_0, &v_2, f_2.fcv), _fx_catch_1);
         if (v_2) {
            FX_CALL(
               _fx_M12K_fuse_loopsFM12add_to_tree_Nt11Map__tree_t2R9Ast__id_trRM10arr_info_t4Nt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tFPi2R9Ast__id_tR9Ast__id_t(
                  res_3, xk_0, xd_0, &cmp_2, &v_0, 0), _fx_catch_1);
            if ((v_0 != 0) + 1 == 2) {
               _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t*
                  vcase_1 = &v_0->u.Node;
               if (vcase_1->t0.tag == 1) {
                  _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_3 = 0;
                  FX_CALL(
                     _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_trRM10arr_info_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
                        &_fx_g19K_fuse_loops__Black, vcase_1->t1, &vcase_1->t2, vcase_1->t3, vcase_1->t4, &v_3), _fx_catch_0);
                  _fx_make_T2Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tB(v_3, false, &v_1);

               _fx_catch_0: ;
                  if (v_3) {
                     _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_3);
                  }
                  goto _fx_endmatch_0;
               }
            }
            _fx_make_T2Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tB(v_0, true, &v_1);

         _fx_endmatch_0: ;
            FX_CHECK_EXN(_fx_catch_1);
            FX_COPY_PTR(v_1.t0, &res_4);
         }
         else {
            FX_COPY_PTR(res_3, &res_4);
         }
         _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t* r_0 = &vcase_0->t4;
         _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&t_1);
         FX_COPY_PTR(*r_0, &t_1);
         FX_FREE_FP(&f_1);
         FX_COPY_FP(&f_2, &f_1);
         FX_FREE_FP(&cmp_1);
         FX_COPY_FP(&cmp_2, &cmp_1);
         _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&res_1);
         FX_COPY_PTR(res_4, &res_1);

      _fx_catch_1: ;
         _fx_free_T2Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tB(&v_1);
         if (v_0) {
            _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_0);
         }
         if (res_4) {
            _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&res_4);
         }
         if (res_3) {
            _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&res_3);
         }
      }
      else {
         _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&result_0);
         FX_COPY_PTR(res_2, &result_0);
         FX_BREAK(_fx_catch_2);

      _fx_catch_2: ;
      }
      FX_CHECK_EXN(_fx_catch_3);

   _fx_catch_3: ;
      if (res_2) {
         _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&res_2);
      }
      FX_FREE_FP(&cmp_2);
      FX_FREE_FP(&f_2);
      if (t_2) {
         _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&t_2);
      }
      FX_CHECK_BREAK();
      FX_CHECK_EXN(_fx_cleanup);
   }
   FX_COPY_PTR(result_0, fx_result);

_fx_cleanup: ;
   if (result_0) {
      _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&result_0);
   }
   if (t_1) {
      _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&t_1);
   }
   FX_FREE_FP(&f_1);
   FX_FREE_FP(&cmp_1);
   if (res_1) {
      _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&res_1);
   }
   return fx_status;
}

FX_EXTERN_C int
   _fx_M12K_fuse_loopsFM6filterRt6Map__t2R9Ast__id_trRM10arr_info_t2Rt6Map__t2R9Ast__id_trRM10arr_info_tFPB2R9Ast__id_trRM10arr_info_t(
   struct _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t* m_0,
   struct _fx_FPB2R9Ast__id_trR24K_fuse_loops__arr_info_t* f_0,
   struct _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t* fx_result,
   void* fx_fv)
{
   _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_0 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t v_1 = {0};
   _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t new_root_0 = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t v_2 = {0};
   int fx_status = 0;
   FX_COPY_PTR(m_0->root, &v_0);
   FX_COPY_FP(&m_0->cmp, &v_1);
   FX_CALL(
      _fx_M12K_fuse_loopsFM7filter_Nt11Map__tree_t2R9Ast__id_trRM10arr_info_t4Nt11Map__tree_t2R9Ast__id_trRM10arr_info_tFPB2R9Ast__id_trRM10arr_info_tFPi2R9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_trRM10arr_info_t(
         v_0, f_0, &v_1, _fx_g19K_fuse_loops__Empty, &new_root_0, 0), _fx_cleanup);
   FX_COPY_FP(&m_0->cmp, &v_2);
   _fx_make_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t(new_root_0, &v_2, fx_result);

_fx_cleanup: ;
   if (v_0) {
      _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_0);
   }
   FX_FREE_FP(&v_1);
   if (new_root_0) {
      _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&new_root_0);
   }
   FX_FREE_FP(&v_2);
   return fx_status;
}

FX_EXTERN_C int _fx_M12K_fuse_loopsFM10fuse_loopsLN14K_form__kexp_t1LN14K_form__kexp_t(
   struct _fx_LN14K_form__kexp_t_data_t* code_0,
   struct _fx_LN14K_form__kexp_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   _fx_Ta2i __fold_result___0 = { 0, 0 };
   _fx_LN14K_form__kexp_t lst_0 = code_0;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_N14K_form__kexp_t e_0 = lst_0->hd;
      _fx_Ta2i v_0 = __fold_result___0;
      int_ nmaps_0 = v_0.t0;
      int_ nfors_0 = v_0.t1;
      int tag_0 = FX_REC_VARIANT_TAG(e_0);
      _fx_Ta2i v_1;
      if (tag_0 == 31) {
         if (FX_REC_VARIANT_TAG(e_0->u.KDefVal.t1) == 26) {
            _fx_Ta2i tup_0 = { nmaps_0 + 1, nfors_0 }; v_1 = tup_0; goto _fx_endmatch_0;
         }
      }
      if (tag_0 == 26) {
         _fx_Ta2i tup_1 = { nmaps_0 + 1, nfors_0 }; v_1 = tup_1; goto _fx_endmatch_0;
      }
      if (tag_0 == 27) {
         _fx_Ta2i tup_2 = { nmaps_0, nfors_0 + 1 }; v_1 = tup_2; goto _fx_endmatch_0;
      }
      _fx_Ta2i tup_3 = { nmaps_0, nfors_0 };
      v_1 = tup_3;

   _fx_endmatch_0: ;
      FX_CHECK_EXN(_fx_catch_0);
      __fold_result___0 = v_1;

   _fx_catch_0: ;
      FX_CHECK_EXN(_fx_cleanup);
   }
   _fx_Ta2i v_2 = __fold_result___0;
   int_ nmaps_1 = v_2.t0;
   int_ nfors_1 = v_2.t1;
   bool t_0;
   if (nmaps_1 >= 1) {
      t_0 = nmaps_1 + nfors_1 >= 2;
   }
   else {
      t_0 = false;
   }
   if (t_0) {
      FX_CALL(_fx_M12K_fuse_loopsFM11fuse_loops_LN14K_form__kexp_t1LN14K_form__kexp_t(code_0, fx_result, 0), _fx_cleanup);
   }
   else {
      FX_COPY_PTR(code_0, fx_result);
   }

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int _fx_M12K_fuse_loopsFM13process_ktyp_v3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t(
   struct _fx_N14K_form__ktyp_t_data_t* t_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_R22K_form__k_fold_callb_t* callb_0,
   void* fx_fv)
{
   int fx_status = 0;
   return fx_status;
}

FX_EXTERN_C int _fx_M12K_fuse_loopsFM10__lambda__B2R9Ast__id_trRM10arr_info_t(
   struct _fx_R9Ast__id_t* i_0,
   struct _fx_rR24K_fuse_loops__arr_info_t_data_t* ainfo_0,
   bool* fx_result,
   void* fx_fv)
{
   _fx_R24K_fuse_loops__arr_info_t v_0 = {0};
   int fx_status = 0;
   _fx_copy_R24K_fuse_loops__arr_info_t(&ainfo_0->data, &v_0);
   if (v_0.arr_nused_for == 1) {
      if (v_0.arr_nused == 1) {
         *fx_result = true; goto _fx_endmatch_0;
      }
   }
   *fx_result = false;

_fx_endmatch_0: ;
   _fx_free_R24K_fuse_loops__arr_info_t(&v_0);
   return fx_status;
}

FX_EXTERN_C int _fx_M12K_fuse_loopsFM10fuse_ktyp_N14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t(
   struct _fx_N14K_form__ktyp_t_data_t* t_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_R17K_form__k_callb_t* callb_0,
   struct _fx_N14K_form__ktyp_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   FX_COPY_PTR(t_0, fx_result);
   return fx_status;
}

FX_EXTERN_C int _fx_M12K_fuse_loopsFM11fuse_loops_LN14K_form__kexp_t1LN14K_form__kexp_t(
   struct _fx_LN14K_form__kexp_t_data_t* code_0,
   struct _fx_LN14K_form__kexp_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_id_0 = {0};
   _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t counters_arg_0 = {0};
   _fx_rRt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t counters_ref_0 = 0;
   _fx_FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t process_atom_0 = {0};
   _fx_FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t process_ktyp__0 = {0};
   _fx_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t v_0 = 0;
   _fx_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t v_1 = 0;
   _fx_R22K_form__k_fold_callb_t process_callb_0 = {0};
   _fx_FPB2R9Ast__id_trR24K_fuse_loops__arr_info_t __lambda___0 = {0};
   _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t arrs_to_fuse_0 = {0};
   _fx_FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t fuse_kexp__0 = {0};
   _fx_FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t fuse_ktyp__0 = {0};
   _fx_Nt6option1FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t v_2 = 0;
   _fx_Nt6option1FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t v_3 = 0;
   _fx_R17K_form__k_callb_t fuse_callb_0 = {0};
   int fx_status = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_id_fp_0 = { _fx_M3AstFM6cmp_idi2RM4id_tRM4id_t, 0 };
   FX_COPY_FP(&cmp_id_fp_0, &cmp_id_0);
   FX_CALL(
      _fx_M12K_fuse_loopsFM5emptyRt6Map__t2R9Ast__id_trRM10arr_info_t1FPi2R9Ast__id_tR9Ast__id_t(&cmp_id_0, &counters_arg_0, 0),
      _fx_cleanup);
   FX_CALL(_fx_make_rRt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&counters_arg_0, &counters_ref_0), _fx_cleanup);
   _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t* counters_0 = &counters_ref_0->data;
   _fx_M12K_fuse_loopsFM7make_fpFPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t1rRt6Map__t2R9Ast__id_trRM10arr_info_t(
      counters_ref_0, &process_atom_0);
   _fx_FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t process_ktyp__fp_0 =
      { _fx_M12K_fuse_loopsFM13process_ktyp_v3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t, 0 };
   FX_COPY_FP(&process_ktyp__fp_0, &process_ktyp__0);
   FX_CALL(
      _fx_M12K_fuse_loopsFM4SomeNt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t(
         &process_ktyp__0, &v_0), _fx_cleanup);
   FX_CALL(
      _fx_M12K_fuse_loopsFM4SomeNt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t(
         &process_atom_0, &v_1), _fx_cleanup);
   _fx_make_R22K_form__k_fold_callb_t(v_0, _fx_g20K_fuse_loops__None2_, v_1, &process_callb_0);
   _fx_LN14K_form__kexp_t lst_0 = code_0;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_N14K_form__kexp_t e_0 = lst_0->hd;
      FX_CALL(_fx_M6K_formFM9fold_kexpv2N14K_form__kexp_tRM14k_fold_callb_t(e_0, &process_callb_0, 0), _fx_catch_3);
      int tag_0 = FX_REC_VARIANT_TAG(e_0);
      if (tag_0 == 31) {
         _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t* vcase_0 = &e_0->u.KDefVal;
         _fx_N14K_form__kexp_t v_4 = vcase_0->t1;
         if (FX_REC_VARIANT_TAG(v_4) == 26) {
            _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t*
               vcase_1 = &v_4->u.KExpMap;
            if (FX_REC_VARIANT_TAG(vcase_1->t3.t0) == 17) {
               _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t v_5 = vcase_1->t0;
               if (v_5 != 0) {
                  if (v_5->tl == 0) {
                     _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t* v_6 = &v_5->hd;
                     if (v_6->t2 == 0) {
                        _fx_R24K_fuse_loops__arr_info_t v_7 = {0};
                        _fx_rR24K_fuse_loops__arr_info_t ainfo_0 = 0;
                        _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_8 = {0};
                        _fx_LT2R9Ast__id_tN13K_form__dom_t idl_0 = v_6->t1;
                        _fx_R16Ast__for_flags_t* flags_0 = &vcase_1->t2;
                        _fx_N14K_form__kexp_t body_0 = vcase_1->t1;
                        bool v_9;
                        bool res_0;
                        FX_CALL(_fx_M15K_remove_unusedFM9pure_kexpB1N14K_form__kexp_t(body_0, &res_0, 0), _fx_catch_0);
                        if (res_0) {
                           v_9 = !flags_0->for_flag_unzip;
                        }
                        else {
                           v_9 = false;
                        }
                        if (v_9) {
                           _fx_make_R24K_fuse_loops__arr_info_t(0, 0, idl_0, body_0, flags_0, &v_7);
                           FX_CALL(_fx_make_rR24K_fuse_loops__arr_info_t(&v_7, &ainfo_0), _fx_catch_0);
                           FX_CALL(
                              _fx_M12K_fuse_loopsFM3addRt6Map__t2R9Ast__id_trRM10arr_info_t3Rt6Map__t2R9Ast__id_trRM10arr_info_tR9Ast__id_trRM10arr_info_t(
                                 counters_0, &vcase_0->t0, ainfo_0, &v_8, 0), _fx_catch_0);
                           _fx_free_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t(counters_0);
                           _fx_copy_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_8, counters_0);
                           FX_CALL(
                              _fx_M12K_fuse_loopsFM11process_idlv3BLT2R9Ast__id_tN13K_form__dom_trRt6Map__t2R9Ast__id_trRM10arr_info_t(
                                 false, idl_0, counters_ref_0, 0), _fx_catch_0);
                        }

                     _fx_catch_0: ;
                        _fx_free_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_8);
                        if (ainfo_0) {
                           _fx_free_rR24K_fuse_loops__arr_info_t(&ainfo_0);
                        }
                        _fx_free_R24K_fuse_loops__arr_info_t(&v_7);
                        goto _fx_endmatch_0;
                     }
                  }
               }
            }
         }
      }
      if (tag_0 == 27) {
         _fx_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t* vcase_2 =
            &e_0->u.KExpFor;
         if (vcase_2->t1 == 0) {
            FX_CALL(
               _fx_M12K_fuse_loopsFM11process_idlv3BLT2R9Ast__id_tN13K_form__dom_trRt6Map__t2R9Ast__id_trRM10arr_info_t(true,
                  vcase_2->t0, counters_ref_0, 0), _fx_catch_1);

         _fx_catch_1: ;
            goto _fx_endmatch_0;
         }
      }
      if (tag_0 == 26) {
         _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t v_10 = e_0->u.KExpMap.t0;
         if (v_10 != 0) {
            if (v_10->tl == 0) {
               _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t* v_11 = &v_10->hd;
               if (v_11->t2 == 0) {
                  FX_CALL(
                     _fx_M12K_fuse_loopsFM11process_idlv3BLT2R9Ast__id_tN13K_form__dom_trRt6Map__t2R9Ast__id_trRM10arr_info_t(
                        false, v_11->t1, counters_ref_0, 0), _fx_catch_2);

               _fx_catch_2: ;
                  goto _fx_endmatch_0;
               }
            }
         }
      }

   _fx_endmatch_0: ;
      FX_CHECK_EXN(_fx_catch_3);

   _fx_catch_3: ;
      FX_CHECK_EXN(_fx_cleanup);
   }
   _fx_FPB2R9Ast__id_trR24K_fuse_loops__arr_info_t __lambda___fp_0 =
      { _fx_M12K_fuse_loopsFM10__lambda__B2R9Ast__id_trRM10arr_info_t, 0 };
   FX_COPY_FP(&__lambda___fp_0, &__lambda___0);
   FX_CALL(
      _fx_M12K_fuse_loopsFM6filterRt6Map__t2R9Ast__id_trRM10arr_info_t2Rt6Map__t2R9Ast__id_trRM10arr_info_tFPB2R9Ast__id_trRM10arr_info_t(
         counters_0, &__lambda___0, &arrs_to_fuse_0, 0), _fx_cleanup);
   _fx_M12K_fuse_loopsFM7make_fpFPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t1Rt6Map__t2R9Ast__id_trRM10arr_info_t(
      &arrs_to_fuse_0, &fuse_kexp__0);
   _fx_FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t fuse_ktyp__fp_0 =
      { _fx_M12K_fuse_loopsFM10fuse_ktyp_N14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t, 0 };
   FX_COPY_FP(&fuse_ktyp__fp_0, &fuse_ktyp__0);
   FX_CALL(
      _fx_M12K_fuse_loopsFM4SomeNt6option1FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t1FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t(
         &fuse_ktyp__0, &v_2), _fx_cleanup);
   FX_CALL(
      _fx_M12K_fuse_loopsFM4SomeNt6option1FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t1FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t(
         &fuse_kexp__0, &v_3), _fx_cleanup);
   _fx_make_R17K_form__k_callb_t(v_2, v_3, _fx_g20K_fuse_loops__None3_, &fuse_callb_0);
   _fx_LN14K_form__kexp_t lstend_0 = 0;
   _fx_LN14K_form__kexp_t lst_1 = code_0;
   for (; lst_1; lst_1 = lst_1->tl) {
      _fx_N14K_form__kexp_t res_1 = 0;
      _fx_N14K_form__kexp_t e_1 = lst_1->hd;
      FX_CALL(fuse_kexp__0.fp(e_1, &fuse_callb_0, &res_1, fuse_kexp__0.fcv), _fx_catch_4);
      _fx_LN14K_form__kexp_t node_0 = 0;
      FX_CALL(_fx_cons_LN14K_form__kexp_t(res_1, 0, false, &node_0), _fx_catch_4);
      FX_LIST_APPEND(*fx_result, lstend_0, node_0);

   _fx_catch_4: ;
      if (res_1) {
         _fx_free_N14K_form__kexp_t(&res_1);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }

_fx_cleanup: ;
   FX_FREE_FP(&cmp_id_0);
   _fx_free_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&counters_arg_0);
   if (counters_ref_0) {
      _fx_free_rRt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&counters_ref_0);
   }
   FX_FREE_FP(&process_atom_0);
   FX_FREE_FP(&process_ktyp__0);
   if (v_0) {
      _fx_free_Nt6option1FPv3N14K_form__ktyp_tR10Ast__loc_tR22K_form__k_fold_callb_t(&v_0);
   }
   if (v_1) {
      _fx_free_Nt6option1FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t(&v_1);
   }
   _fx_free_R22K_form__k_fold_callb_t(&process_callb_0);
   FX_FREE_FP(&__lambda___0);
   _fx_free_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&arrs_to_fuse_0);
   FX_FREE_FP(&fuse_kexp__0);
   FX_FREE_FP(&fuse_ktyp__0);
   if (v_2) {
      _fx_free_Nt6option1FPN14K_form__ktyp_t3N14K_form__ktyp_tR10Ast__loc_tR17K_form__k_callb_t(&v_2);
   }
   if (v_3) {
      _fx_free_Nt6option1FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t(&v_3);
   }
   _fx_free_R17K_form__k_callb_t(&fuse_callb_0);
   return fx_status;
}

static int _fx_M12K_fuse_loopsFM12process_atomv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t(
   struct _fx_N14K_form__atom_t* a_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_R22K_form__k_fold_callb_t* callb_0,
   void* fx_fv)
{
   int fx_status = 0;
   _fx_M12K_fuse_loopsFM12process_atomv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t_cldata_t* cv_0 =
      (_fx_M12K_fuse_loopsFM12process_atomv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t_cldata_t*)fx_fv;
   _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t* counters_0 = &cv_0->t0->data;
   if (a_0->tag == 1) {
      _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_0 = 0;
      _fx_FPi2R9Ast__id_tR9Ast__id_t v_1 = {0};
      _fx_Nt6option1rR24K_fuse_loops__arr_info_t result_0 = {0};
      _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t t_0 = 0;
      _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_0 = {0};
      _fx_Nt6option1rR24K_fuse_loops__arr_info_t v_2 = {0};
      FX_COPY_PTR(counters_0->root, &v_0);
      FX_COPY_FP(&counters_0->cmp, &v_1);
      FX_COPY_PTR(v_0, &t_0);
      _fx_R9Ast__id_t xk_0 = a_0->u.AtomId;
      FX_COPY_FP(&v_1, &cmp_0);
      for (;;) {
         _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t t_1 = 0;
         _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_1 = {0};
         FX_COPY_PTR(t_0, &t_1);
         _fx_R9Ast__id_t xk_1 = xk_0;
         FX_COPY_FP(&cmp_0, &cmp_1);
         if ((t_1 != 0) + 1 == 2) {
            _fx_Nt6option1rR24K_fuse_loops__arr_info_t result_1 = {0};
            _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t*
               vcase_0 = &t_1->u.Node;
            int_ c_0;
            FX_CALL(cmp_1.fp(&xk_1, &vcase_0->t2, &c_0, cmp_1.fcv), _fx_catch_0);
            if (c_0 < 0) {
               _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t* l_0 = &vcase_0->t1;
               _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&t_0);
               FX_COPY_PTR(*l_0, &t_0);
               xk_0 = xk_1;
               FX_FREE_FP(&cmp_0);
               FX_COPY_FP(&cmp_1, &cmp_0);
            }
            else if (c_0 > 0) {
               _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t* r_0 = &vcase_0->t4;
               _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&t_0);
               FX_COPY_PTR(*r_0, &t_0);
               xk_0 = xk_1;
               FX_FREE_FP(&cmp_0);
               FX_COPY_FP(&cmp_1, &cmp_0);
            }
            else {
               _fx_M12K_fuse_loopsFM4SomeNt6option1rRM10arr_info_t1rRM10arr_info_t(vcase_0->t3, &result_1);
               _fx_free_Nt6option1rR24K_fuse_loops__arr_info_t(&result_0);
               _fx_copy_Nt6option1rR24K_fuse_loops__arr_info_t(&result_1, &result_0);
               FX_BREAK(_fx_catch_0);
            }

         _fx_catch_0: ;
            _fx_free_Nt6option1rR24K_fuse_loops__arr_info_t(&result_1);
         }
         else {
            _fx_free_Nt6option1rR24K_fuse_loops__arr_info_t(&result_0);
            _fx_copy_Nt6option1rR24K_fuse_loops__arr_info_t(&_fx_g20K_fuse_loops__None1_, &result_0);
            FX_BREAK(_fx_catch_1);

         _fx_catch_1: ;
         }
         FX_CHECK_EXN(_fx_catch_2);

      _fx_catch_2: ;
         FX_FREE_FP(&cmp_1);
         if (t_1) {
            _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&t_1);
         }
         FX_CHECK_BREAK();
         FX_CHECK_EXN(_fx_catch_3);
      }
      _fx_copy_Nt6option1rR24K_fuse_loops__arr_info_t(&result_0, &v_2);
      if (v_2.tag == 2) {
         _fx_rR24K_fuse_loops__arr_info_t ainfo_0 = v_2.u.Some; ainfo_0->data.arr_nused = ainfo_0->data.arr_nused + 1;
      }
      FX_CHECK_EXN(_fx_catch_3);

   _fx_catch_3: ;
      _fx_free_Nt6option1rR24K_fuse_loops__arr_info_t(&v_2);
      FX_FREE_FP(&cmp_0);
      if (t_0) {
         _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&t_0);
      }
      _fx_free_Nt6option1rR24K_fuse_loops__arr_info_t(&result_0);
      FX_FREE_FP(&v_1);
      if (v_0) {
         _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_0);
      }
   }
   return fx_status;
}

FX_EXTERN_C int
   _fx_M12K_fuse_loopsFM7make_fpFPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t1rRt6Map__t2R9Ast__id_trRM10arr_info_t(
   struct _fx_rRt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* arg0,
   struct _fx_FPv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t* fx_result)
{
   FX_MAKE_FP_IMPL_START(_fx_M12K_fuse_loopsFM12process_atomv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t_cldata_t,
      _fx_free_M12K_fuse_loopsFM12process_atomv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t,
      _fx_M12K_fuse_loopsFM12process_atomv3N14K_form__atom_tR10Ast__loc_tR22K_form__k_fold_callb_t);
   FX_COPY_PTR(arg0, &fcv->t0);
   return 0;
}

static int _fx_M12K_fuse_loopsFM11process_idlv3BLT2R9Ast__id_tN13K_form__dom_trRt6Map__t2R9Ast__id_trRM10arr_info_t(
   bool inside_for_0,
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* idl_0,
   struct _fx_rRt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t_data_t* counters_ref_0,
   void* fx_fv)
{
   int fx_status = 0;
   _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t* counters_0 = &counters_ref_0->data;
   _fx_LT2R9Ast__id_tN13K_form__dom_t lst_0 = idl_0;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_N13K_form__dom_t dom_0 = {0};
      _fx_T2R9Ast__id_tN13K_form__dom_t* __pat___0 = &lst_0->hd;
      _fx_copy_N13K_form__dom_t(&__pat___0->t1, &dom_0);
      if (dom_0.tag == 1) {
         _fx_N14K_form__atom_t* v_0 = &dom_0.u.DomainElem;
         if (v_0->tag == 1) {
            _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_1 = 0;
            _fx_FPi2R9Ast__id_tR9Ast__id_t v_2 = {0};
            _fx_Nt6option1rR24K_fuse_loops__arr_info_t result_0 = {0};
            _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t t_0 = 0;
            _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_0 = {0};
            _fx_Nt6option1rR24K_fuse_loops__arr_info_t v_3 = {0};
            FX_COPY_PTR(counters_0->root, &v_1);
            FX_COPY_FP(&counters_0->cmp, &v_2);
            FX_COPY_PTR(v_1, &t_0);
            _fx_R9Ast__id_t xk_0 = v_0->u.AtomId;
            FX_COPY_FP(&v_2, &cmp_0);
            for (;;) {
               _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t t_1 = 0;
               _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_1 = {0};
               FX_COPY_PTR(t_0, &t_1);
               _fx_R9Ast__id_t xk_1 = xk_0;
               FX_COPY_FP(&cmp_0, &cmp_1);
               if ((t_1 != 0) + 1 == 2) {
                  _fx_Nt6option1rR24K_fuse_loops__arr_info_t result_1 = {0};
                  _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t*
                     vcase_0 = &t_1->u.Node;
                  int_ c_0;
                  FX_CALL(cmp_1.fp(&xk_1, &vcase_0->t2, &c_0, cmp_1.fcv), _fx_catch_0);
                  if (c_0 < 0) {
                     _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t* l_0 = &vcase_0->t1;
                     _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&t_0);
                     FX_COPY_PTR(*l_0, &t_0);
                     xk_0 = xk_1;
                     FX_FREE_FP(&cmp_0);
                     FX_COPY_FP(&cmp_1, &cmp_0);
                  }
                  else if (c_0 > 0) {
                     _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t* r_0 = &vcase_0->t4;
                     _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&t_0);
                     FX_COPY_PTR(*r_0, &t_0);
                     xk_0 = xk_1;
                     FX_FREE_FP(&cmp_0);
                     FX_COPY_FP(&cmp_1, &cmp_0);
                  }
                  else {
                     _fx_M12K_fuse_loopsFM4SomeNt6option1rRM10arr_info_t1rRM10arr_info_t(vcase_0->t3, &result_1);
                     _fx_free_Nt6option1rR24K_fuse_loops__arr_info_t(&result_0);
                     _fx_copy_Nt6option1rR24K_fuse_loops__arr_info_t(&result_1, &result_0);
                     FX_BREAK(_fx_catch_0);
                  }

               _fx_catch_0: ;
                  _fx_free_Nt6option1rR24K_fuse_loops__arr_info_t(&result_1);
               }
               else {
                  _fx_free_Nt6option1rR24K_fuse_loops__arr_info_t(&result_0);
                  _fx_copy_Nt6option1rR24K_fuse_loops__arr_info_t(&_fx_g20K_fuse_loops__None1_, &result_0);
                  FX_BREAK(_fx_catch_1);

               _fx_catch_1: ;
               }
               FX_CHECK_EXN(_fx_catch_2);

            _fx_catch_2: ;
               FX_FREE_FP(&cmp_1);
               if (t_1) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&t_1);
               }
               FX_CHECK_BREAK();
               FX_CHECK_EXN(_fx_catch_3);
            }
            _fx_copy_Nt6option1rR24K_fuse_loops__arr_info_t(&result_0, &v_3);
            if (v_3.tag == 2) {
               _fx_rR24K_fuse_loops__arr_info_t ainfo_0 = v_3.u.Some;
               bool is_parallel_0 = ainfo_0->data.arr_map_flags.for_flag_parallel;
               bool t_2;
               if (inside_for_0) {
                  t_2 = is_parallel_0;
               }
               else {
                  t_2 = false;
               }
               if (!t_2) {
                  ainfo_0->data.arr_nused_for = ainfo_0->data.arr_nused_for + 1;
               }
            }
            FX_CHECK_EXN(_fx_catch_3);

         _fx_catch_3: ;
            _fx_free_Nt6option1rR24K_fuse_loops__arr_info_t(&v_3);
            FX_FREE_FP(&cmp_0);
            if (t_0) {
               _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&t_0);
            }
            _fx_free_Nt6option1rR24K_fuse_loops__arr_info_t(&result_0);
            FX_FREE_FP(&v_2);
            if (v_1) {
               _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_1);
            }
            goto _fx_endmatch_0;
         }
      }

   _fx_endmatch_0: ;
      FX_CHECK_EXN(_fx_catch_4);

   _fx_catch_4: ;
      _fx_free_N13K_form__dom_t(&dom_0);
      FX_CHECK_EXN(_fx_cleanup);
   }

_fx_cleanup: ;
   return fx_status;
}

static int
   _fx_M12K_fuse_loopsFM8fuse_forT2LT2R9Ast__id_tN13K_form__dom_tN14K_form__kexp_t4LT2R9Ast__id_tN13K_form__dom_tN14K_form__kexp_tR10Ast__loc_tRt6Map__t2R9Ast__id_trRM10arr_info_t(
   struct _fx_LT2R9Ast__id_tN13K_form__dom_t_data_t* idl_0,
   struct _fx_N14K_form__kexp_t_data_t* body_0,
   struct _fx_R10Ast__loc_t* loc_0,
   struct _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t* arrs_to_fuse_0,
   struct _fx_T2LT2R9Ast__id_tN13K_form__dom_tN14K_form__kexp_t* fx_result,
   void* fx_fv)
{
   _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_id_0 = {0};
   _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t v_0 = {0};
   _fx_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t __fold_result___0 = {0};
   _fx_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t v_1 = {0};
   _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t arr_fuse_map_0 = {0};
   _fx_LT2R9Ast__id_trR24K_fuse_loops__arr_info_t a2f_0 = 0;
   _fx_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t __fold_result___1 = {0};
   _fx_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t v_2 = {0};
   _fx_LT2R9Ast__id_tN13K_form__dom_t new_idl_0 = 0;
   _fx_LN14K_form__kexp_t pbody_0 = 0;
   _fx_LN14K_form__kexp_t v_3 = 0;
   _fx_N14K_form__kexp_t new_body_0 = 0;
   int fx_status = 0;
   _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_id_fp_0 = { _fx_M3AstFM6cmp_idi2RM4id_tRM4id_t, 0 };
   FX_COPY_FP(&cmp_id_fp_0, &cmp_id_0);
   _fx_make_Rt6Map__t2R9Ast__id_tR9Ast__id_t(_fx_g21K_fuse_loops__Empty1_, &cmp_id_0, &v_0);
   _fx_make_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_0, 0, &__fold_result___0);
   _fx_LT2R9Ast__id_tN13K_form__dom_t lst_0 = idl_0;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_N13K_form__dom_t dom_0 = {0};
      _fx_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t v_4 = {0};
      _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t arr_fuse_map_1 = {0};
      _fx_LT2R9Ast__id_trR24K_fuse_loops__arr_info_t a2f_1 = 0;
      _fx_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t v_5 = {0};
      _fx_T2R9Ast__id_tN13K_form__dom_t* __pat___0 = &lst_0->hd;
      _fx_R9Ast__id_t i_0 = __pat___0->t0;
      _fx_copy_N13K_form__dom_t(&__pat___0->t1, &dom_0);
      _fx_copy_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t(&__fold_result___0, &v_4);
      _fx_copy_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&v_4.t0, &arr_fuse_map_1);
      FX_COPY_PTR(v_4.t1, &a2f_1);
      if (dom_0.tag == 1) {
         _fx_N14K_form__atom_t* v_6 = &dom_0.u.DomainElem;
         if (v_6->tag == 1) {
            _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_7 = 0;
            _fx_FPi2R9Ast__id_tR9Ast__id_t v_8 = {0};
            _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_9 = 0;
            _fx_T2Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tB v_10 = {0};
            _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t new_root_0 = 0;
            _fx_FPi2R9Ast__id_tR9Ast__id_t v_11 = {0};
            _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t arr_fuse_map_2 = {0};
            _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_12 = 0;
            _fx_FPi2R9Ast__id_tR9Ast__id_t v_13 = {0};
            _fx_Nt6option1rR24K_fuse_loops__arr_info_t result_0 = {0};
            _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t t_0 = 0;
            _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_0 = {0};
            _fx_Nt6option1rR24K_fuse_loops__arr_info_t v_14 = {0};
            _fx_R9Ast__id_t* arr_0 = &v_6->u.AtomId;
            FX_COPY_PTR(arr_fuse_map_1.root, &v_7);
            FX_COPY_FP(&arr_fuse_map_1.cmp, &v_8);
            FX_CALL(
               _fx_M12K_fuse_loopsFM12add_to_tree_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t4Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tFPi2R9Ast__id_tR9Ast__id_t(
                  v_7, arr_0, &i_0, &v_8, &v_9, 0), _fx_catch_5);
            if ((v_9 != 0) + 1 == 2) {
               _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t*
                  vcase_0 = &v_9->u.Node;
               if (vcase_0->t0.tag == 1) {
                  _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_15 = 0;
                  FX_CALL(
                     _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_tR9Ast__id_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
                        &_fx_g19K_fuse_loops__Black, vcase_0->t1, &vcase_0->t2, &vcase_0->t3, vcase_0->t4, &v_15), _fx_catch_0);
                  _fx_make_T2Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tB(v_15, false, &v_10);

               _fx_catch_0: ;
                  if (v_15) {
                     _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&v_15);
                  }
                  goto _fx_endmatch_0;
               }
            }
            _fx_make_T2Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tB(v_9, true, &v_10);

         _fx_endmatch_0: ;
            FX_CHECK_EXN(_fx_catch_5);
            FX_COPY_PTR(v_10.t0, &new_root_0);
            FX_COPY_FP(&arr_fuse_map_1.cmp, &v_11);
            _fx_make_Rt6Map__t2R9Ast__id_tR9Ast__id_t(new_root_0, &v_11, &arr_fuse_map_2);
            FX_COPY_PTR(arrs_to_fuse_0->root, &v_12);
            FX_COPY_FP(&arrs_to_fuse_0->cmp, &v_13);
            FX_COPY_PTR(v_12, &t_0);
            _fx_R9Ast__id_t xk_0 = *arr_0;
            FX_COPY_FP(&v_13, &cmp_0);
            for (;;) {
               _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t t_1 = 0;
               _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_1 = {0};
               FX_COPY_PTR(t_0, &t_1);
               _fx_R9Ast__id_t xk_1 = xk_0;
               FX_COPY_FP(&cmp_0, &cmp_1);
               if ((t_1 != 0) + 1 == 2) {
                  _fx_Nt6option1rR24K_fuse_loops__arr_info_t result_1 = {0};
                  _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t*
                     vcase_1 = &t_1->u.Node;
                  int_ c_0;
                  FX_CALL(cmp_1.fp(&xk_1, &vcase_1->t2, &c_0, cmp_1.fcv), _fx_catch_1);
                  if (c_0 < 0) {
                     _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t* l_0 = &vcase_1->t1;
                     _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&t_0);
                     FX_COPY_PTR(*l_0, &t_0);
                     xk_0 = xk_1;
                     FX_FREE_FP(&cmp_0);
                     FX_COPY_FP(&cmp_1, &cmp_0);
                  }
                  else if (c_0 > 0) {
                     _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t* r_0 = &vcase_1->t4;
                     _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&t_0);
                     FX_COPY_PTR(*r_0, &t_0);
                     xk_0 = xk_1;
                     FX_FREE_FP(&cmp_0);
                     FX_COPY_FP(&cmp_1, &cmp_0);
                  }
                  else {
                     _fx_M12K_fuse_loopsFM4SomeNt6option1rRM10arr_info_t1rRM10arr_info_t(vcase_1->t3, &result_1);
                     _fx_free_Nt6option1rR24K_fuse_loops__arr_info_t(&result_0);
                     _fx_copy_Nt6option1rR24K_fuse_loops__arr_info_t(&result_1, &result_0);
                     FX_BREAK(_fx_catch_1);
                  }

               _fx_catch_1: ;
                  _fx_free_Nt6option1rR24K_fuse_loops__arr_info_t(&result_1);
               }
               else {
                  _fx_free_Nt6option1rR24K_fuse_loops__arr_info_t(&result_0);
                  _fx_copy_Nt6option1rR24K_fuse_loops__arr_info_t(&_fx_g20K_fuse_loops__None1_, &result_0);
                  FX_BREAK(_fx_catch_2);

               _fx_catch_2: ;
               }
               FX_CHECK_EXN(_fx_catch_3);

            _fx_catch_3: ;
               FX_FREE_FP(&cmp_1);
               if (t_1) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&t_1);
               }
               FX_CHECK_BREAK();
               FX_CHECK_EXN(_fx_catch_5);
            }
            _fx_copy_Nt6option1rR24K_fuse_loops__arr_info_t(&result_0, &v_14);
            if (v_14.tag == 2) {
               _fx_T2R9Ast__id_trR24K_fuse_loops__arr_info_t v_16 = {0};
               _fx_LT2R9Ast__id_trR24K_fuse_loops__arr_info_t v_17 = 0;
               _fx_make_T2R9Ast__id_trR24K_fuse_loops__arr_info_t(arr_0, v_14.u.Some, &v_16);
               FX_CALL(_fx_cons_LT2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_16, a2f_1, true, &v_17), _fx_catch_4);
               _fx_make_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t(&arr_fuse_map_2, v_17,
                  &v_5);

            _fx_catch_4: ;
               if (v_17) {
                  _fx_free_LT2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_17);
               }
               _fx_free_T2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_16);
            }
            else {
               _fx_make_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t(&arr_fuse_map_2, a2f_1,
                  &v_5);
            }
            FX_CHECK_EXN(_fx_catch_5);

         _fx_catch_5: ;
            _fx_free_Nt6option1rR24K_fuse_loops__arr_info_t(&v_14);
            FX_FREE_FP(&cmp_0);
            if (t_0) {
               _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&t_0);
            }
            _fx_free_Nt6option1rR24K_fuse_loops__arr_info_t(&result_0);
            FX_FREE_FP(&v_13);
            if (v_12) {
               _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_12);
            }
            _fx_free_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&arr_fuse_map_2);
            FX_FREE_FP(&v_11);
            if (new_root_0) {
               _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&new_root_0);
            }
            _fx_free_T2Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tB(&v_10);
            if (v_9) {
               _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&v_9);
            }
            FX_FREE_FP(&v_8);
            if (v_7) {
               _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&v_7);
            }
            goto _fx_endmatch_1;
         }
      }
      _fx_make_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t(&arr_fuse_map_1, a2f_1, &v_5);

   _fx_endmatch_1: ;
      FX_CHECK_EXN(_fx_catch_6);
      _fx_free_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t(&__fold_result___0);
      _fx_copy_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_5, &__fold_result___0);

   _fx_catch_6: ;
      _fx_free_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_5);
      if (a2f_1) {
         _fx_free_LT2R9Ast__id_trR24K_fuse_loops__arr_info_t(&a2f_1);
      }
      _fx_free_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&arr_fuse_map_1);
      _fx_free_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_4);
      _fx_free_N13K_form__dom_t(&dom_0);
      FX_CHECK_EXN(_fx_cleanup);
   }
   _fx_copy_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t(&__fold_result___0, &v_1);
   _fx_copy_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&v_1.t0, &arr_fuse_map_0);
   FX_COPY_PTR(v_1.t1, &a2f_0);
   _fx_make_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(0, 0, &arr_fuse_map_0,
      &__fold_result___1);
   _fx_LT2R9Ast__id_tN13K_form__dom_t lst_1 = idl_0;
   for (; lst_1; lst_1 = lst_1->tl) {
      _fx_N13K_form__dom_t dom_1 = {0};
      _fx_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t v_18 = {0};
      _fx_LT2R9Ast__id_tN13K_form__dom_t new_idl_1 = 0;
      _fx_LN14K_form__kexp_t pbody_1 = 0;
      _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t arr_fuse_map_3 = {0};
      _fx_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t v_19 = {0};
      _fx_T2R9Ast__id_tN13K_form__dom_t* __pat___1 = &lst_1->hd;
      _fx_R9Ast__id_t i_1 = __pat___1->t0;
      _fx_copy_N13K_form__dom_t(&__pat___1->t1, &dom_1);
      _fx_copy_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(&__fold_result___1, &v_18);
      FX_COPY_PTR(v_18.t0, &new_idl_1);
      FX_COPY_PTR(v_18.t1, &pbody_1);
      _fx_copy_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&v_18.t2, &arr_fuse_map_3);
      if (dom_1.tag == 1) {
         _fx_N14K_form__atom_t* v_20 = &dom_1.u.DomainElem;
         if (v_20->tag == 1) {
            _fx_Nt6option1T2R9Ast__id_trR24K_fuse_loops__arr_info_t __fold_result___2 = {0};
            _fx_Nt6option1T2R9Ast__id_trR24K_fuse_loops__arr_info_t __fold_result___3 = {0};
            _fx_R9Ast__id_t* arr_1 = &v_20->u.AtomId;
            _fx_copy_Nt6option1T2R9Ast__id_trR24K_fuse_loops__arr_info_t(&_fx_g18K_fuse_loops__None, &__fold_result___2);
            _fx_LT2R9Ast__id_trR24K_fuse_loops__arr_info_t lst_2 = a2f_0;
            for (; lst_2; lst_2 = lst_2->tl) {
               _fx_Nt6option1T2R9Ast__id_trR24K_fuse_loops__arr_info_t v_21 = {0};
               _fx_T2R9Ast__id_trR24K_fuse_loops__arr_info_t* __pat___2 = &lst_2->hd;
               _fx_R9Ast__id_t arr2_0 = __pat___2->t0;
               bool res_0;
               FX_CALL(_fx_M3AstFM6__eq__B2RM4id_tRM4id_t(arr_1, &arr2_0, &res_0, 0), _fx_catch_7);
               if (res_0) {
                  _fx_M12K_fuse_loopsFM4SomeNt6option1T2R9Ast__id_trRM10arr_info_t1T2R9Ast__id_trRM10arr_info_t(__pat___2,
                     &v_21);
                  _fx_free_Nt6option1T2R9Ast__id_trR24K_fuse_loops__arr_info_t(&__fold_result___2);
                  _fx_copy_Nt6option1T2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_21, &__fold_result___2);
                  FX_BREAK(_fx_catch_7);
               }

            _fx_catch_7: ;
               _fx_free_Nt6option1T2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_21);
               FX_CHECK_BREAK();
               FX_CHECK_EXN(_fx_catch_20);
            }
            _fx_copy_Nt6option1T2R9Ast__id_trR24K_fuse_loops__arr_info_t(&__fold_result___2, &__fold_result___3);
            if (__fold_result___3.tag == 2) {
               _fx_R24K_fuse_loops__arr_info_t v_22 = {0};
               _fx_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t __fold_result___4 = {0};
               _fx_LT2R9Ast__id_tN13K_form__dom_t arr_idl_0 = 0;
               _fx_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t v_23 = {0};
               _fx_LT2R9Ast__id_tN13K_form__dom_t new_idl2_0 = 0;
               _fx_LN14K_form__kexp_t pbody2_0 = 0;
               _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t new_fuse_map_0 = {0};
               _fx_N14K_form__ktyp_t t_2 = 0;
               _fx_R16Ast__val_flags_t v_24 = {0};
               _fx_Nt6option1N14K_form__kexp_t v_25 = {0};
               _fx_LN14K_form__kexp_t pbody2_1 = 0;
               _fx_copy_R24K_fuse_loops__arr_info_t(&__fold_result___3.u.Some.t1->data, &v_22);
               _fx_N14K_form__kexp_t arr_body_0 = v_22.arr_body;
               _fx_make_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(new_idl_1, pbody_1,
                  &arr_fuse_map_3, &__fold_result___4);
               FX_COPY_PTR(v_22.arr_idl, &arr_idl_0);
               _fx_LT2R9Ast__id_tN13K_form__dom_t lst_3 = arr_idl_0;
               for (; lst_3; lst_3 = lst_3->tl) {
                  _fx_N13K_form__dom_t nested_dom_0 = {0};
                  _fx_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t v_26 = {0};
                  _fx_LT2R9Ast__id_tN13K_form__dom_t new_idl2_1 = 0;
                  _fx_LN14K_form__kexp_t pbody2_2 = 0;
                  _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t new_fuse_map_1 = {0};
                  _fx_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t v_27 = {0};
                  _fx_T2R9Ast__id_tN13K_form__dom_t* __pat___3 = &lst_3->hd;
                  _fx_R9Ast__id_t nested_i_0 = __pat___3->t0;
                  _fx_copy_N13K_form__dom_t(&__pat___3->t1, &nested_dom_0);
                  _fx_copy_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(
                     &__fold_result___4, &v_26);
                  FX_COPY_PTR(v_26.t0, &new_idl2_1);
                  FX_COPY_PTR(v_26.t1, &pbody2_2);
                  _fx_copy_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&v_26.t2, &new_fuse_map_1);
                  if (nested_dom_0.tag == 1) {
                     _fx_N14K_form__atom_t* v_28 = &nested_dom_0.u.DomainElem;
                     if (v_28->tag == 1) {
                        _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_29 = 0;
                        _fx_FPi2R9Ast__id_tR9Ast__id_t v_30 = {0};
                        _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t t_3 = 0;
                        _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_2 = {0};
                        _fx_R9Ast__id_t* nested_arr_0 = &v_28->u.AtomId;
                        FX_COPY_PTR(arr_fuse_map_3.root, &v_29);
                        FX_COPY_FP(&arr_fuse_map_3.cmp, &v_30);
                        _fx_Nt6option1R9Ast__id_t result_2 = {0};
                        FX_COPY_PTR(v_29, &t_3);
                        _fx_R9Ast__id_t xk_2 = *nested_arr_0;
                        FX_COPY_FP(&v_30, &cmp_2);
                        for (;;) {
                           _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t t_4 = 0;
                           _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_3 = {0};
                           FX_COPY_PTR(t_3, &t_4);
                           _fx_R9Ast__id_t xk_3 = xk_2;
                           FX_COPY_FP(&cmp_2, &cmp_3);
                           if ((t_4 != 0) + 1 == 2) {
                              _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t*
                                 vcase_2 = &t_4->u.Node;
                              int_ c_1;
                              FX_CALL(cmp_3.fp(&xk_3, &vcase_2->t2, &c_1, cmp_3.fcv), _fx_catch_8);
                              if (c_1 < 0) {
                                 _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t* l_1 = &vcase_2->t1;
                                 _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&t_3);
                                 FX_COPY_PTR(*l_1, &t_3);
                                 xk_2 = xk_3;
                                 FX_FREE_FP(&cmp_2);
                                 FX_COPY_FP(&cmp_3, &cmp_2);
                              }
                              else if (c_1 > 0) {
                                 _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t* r_1 = &vcase_2->t4;
                                 _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&t_3);
                                 FX_COPY_PTR(*r_1, &t_3);
                                 xk_2 = xk_3;
                                 FX_FREE_FP(&cmp_2);
                                 FX_COPY_FP(&cmp_3, &cmp_2);
                              }
                              else {
                                 _fx_Nt6option1R9Ast__id_t result_3;
                                 _fx_M12K_fuse_loopsFM4SomeNt6option1R9Ast__id_t1R9Ast__id_t(&vcase_2->t3, &result_3);
                                 result_2 = result_3;
                                 FX_BREAK(_fx_catch_8);
                              }

                           _fx_catch_8: ;
                           }
                           else {
                              result_2 = _fx_g20K_fuse_loops__None4_; FX_BREAK(_fx_catch_9);  _fx_catch_9: ;
                           }
                           FX_CHECK_EXN(_fx_catch_10);

                        _fx_catch_10: ;
                           FX_FREE_FP(&cmp_3);
                           if (t_4) {
                              _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&t_4);
                           }
                           FX_CHECK_BREAK();
                           FX_CHECK_EXN(_fx_catch_14);
                        }
                        _fx_Nt6option1R9Ast__id_t v_31 = result_2;
                        if (v_31.tag == 2) {
                           _fx_N14K_form__ktyp_t t_5 = 0;
                           _fx_R16Ast__val_flags_t v_32 = {0};
                           _fx_N14K_form__atom_t v_33 = {0};
                           _fx_T2N14K_form__ktyp_tR10Ast__loc_t v_34 = {0};
                           _fx_N14K_form__kexp_t v_35 = 0;
                           _fx_Nt6option1N14K_form__kexp_t v_36 = {0};
                           _fx_LN14K_form__kexp_t pbody2_3 = 0;
                           _fx_R9Ast__id_t* outer_i_0 = &v_31.u.Some;
                           FX_CALL(
                              _fx_M6K_formFM12get_idk_ktypN14K_form__ktyp_t2R9Ast__id_tR10Ast__loc_t(outer_i_0, loc_0, &t_5, 0),
                              _fx_catch_11);
                           FX_CALL(_fx_M3AstFM21default_tempval_flagsRM11val_flags_t0(&v_32, 0), _fx_catch_11);
                           _fx_M6K_formFM6AtomIdN14K_form__atom_t1R9Ast__id_t(outer_i_0, &v_33);
                           _fx_make_T2N14K_form__ktyp_tR10Ast__loc_t(t_5, loc_0, &v_34);
                           FX_CALL(
                              _fx_M6K_formFM8KExpAtomN14K_form__kexp_t2N14K_form__atom_tT2N14K_form__ktyp_tR10Ast__loc_t(&v_33,
                                 &v_34, &v_35), _fx_catch_11);
                           _fx_M12K_fuse_loopsFM4SomeNt6option1N14K_form__kexp_t1N14K_form__kexp_t(v_35, &v_36);
                           FX_CALL(
                              _fx_M6K_formFM14create_kdefvalLN14K_form__kexp_t6R9Ast__id_tN14K_form__ktyp_tR16Ast__val_flags_tNt6option1N14K_form__kexp_tLN14K_form__kexp_tR10Ast__loc_t(
                                 &nested_i_0, t_5, &v_32, &v_36, pbody2_2, loc_0, &pbody2_3, 0), _fx_catch_11);
                           _fx_make_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(
                              new_idl2_1, pbody2_3, &new_fuse_map_1, &v_27);

                        _fx_catch_11: ;
                           if (pbody2_3) {
                              _fx_free_LN14K_form__kexp_t(&pbody2_3);
                           }
                           _fx_free_Nt6option1N14K_form__kexp_t(&v_36);
                           if (v_35) {
                              _fx_free_N14K_form__kexp_t(&v_35);
                           }
                           _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&v_34);
                           _fx_free_N14K_form__atom_t(&v_33);
                           _fx_free_R16Ast__val_flags_t(&v_32);
                           if (t_5) {
                              _fx_free_N14K_form__ktyp_t(&t_5);
                           }
                        }
                        else {
                           _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_37 = 0;
                           _fx_FPi2R9Ast__id_tR9Ast__id_t v_38 = {0};
                           _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_39 = 0;
                           _fx_T2Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tB v_40 = {0};
                           _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t new_root_1 = 0;
                           _fx_FPi2R9Ast__id_tR9Ast__id_t v_41 = {0};
                           _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t new_fuse_map_2 = {0};
                           _fx_T2R9Ast__id_tN13K_form__dom_t v_42 = {0};
                           _fx_LT2R9Ast__id_tN13K_form__dom_t v_43 = 0;
                           FX_COPY_PTR(new_fuse_map_1.root, &v_37);
                           FX_COPY_FP(&new_fuse_map_1.cmp, &v_38);
                           FX_CALL(
                              _fx_M12K_fuse_loopsFM12add_to_tree_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t4Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tFPi2R9Ast__id_tR9Ast__id_t(
                                 v_37, nested_arr_0, &nested_i_0, &v_38, &v_39, 0), _fx_catch_13);
                           if ((v_39 != 0) + 1 == 2) {
                              _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t*
                                 vcase_3 = &v_39->u.Node;
                              if (vcase_3->t0.tag == 1) {
                                 _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_44 = 0;
                                 FX_CALL(
                                    _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_tR9Ast__id_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
                                       &_fx_g19K_fuse_loops__Black, vcase_3->t1, &vcase_3->t2, &vcase_3->t3, vcase_3->t4,
                                       &v_44), _fx_catch_12);
                                 _fx_make_T2Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tB(v_44, false, &v_40);

                              _fx_catch_12: ;
                                 if (v_44) {
                                    _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&v_44);
                                 }
                                 goto _fx_endmatch_2;
                              }
                           }
                           _fx_make_T2Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tB(v_39, true, &v_40);

                        _fx_endmatch_2: ;
                           FX_CHECK_EXN(_fx_catch_13);
                           FX_COPY_PTR(v_40.t0, &new_root_1);
                           FX_COPY_FP(&new_fuse_map_1.cmp, &v_41);
                           _fx_make_Rt6Map__t2R9Ast__id_tR9Ast__id_t(new_root_1, &v_41, &new_fuse_map_2);
                           _fx_make_T2R9Ast__id_tN13K_form__dom_t(&nested_i_0, &nested_dom_0, &v_42);
                           FX_CALL(_fx_cons_LT2R9Ast__id_tN13K_form__dom_t(&v_42, new_idl2_1, true, &v_43), _fx_catch_13);
                           _fx_make_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(v_43,
                              pbody2_2, &new_fuse_map_2, &v_27);

                        _fx_catch_13: ;
                           if (v_43) {
                              _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&v_43);
                           }
                           _fx_free_T2R9Ast__id_tN13K_form__dom_t(&v_42);
                           _fx_free_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&new_fuse_map_2);
                           FX_FREE_FP(&v_41);
                           if (new_root_1) {
                              _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&new_root_1);
                           }
                           _fx_free_T2Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tB(&v_40);
                           if (v_39) {
                              _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&v_39);
                           }
                           FX_FREE_FP(&v_38);
                           if (v_37) {
                              _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&v_37);
                           }
                        }
                        FX_CHECK_EXN(_fx_catch_14);

                     _fx_catch_14: ;
                        FX_FREE_FP(&cmp_2);
                        if (t_3) {
                           _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&t_3);
                        }
                        FX_FREE_FP(&v_30);
                        if (v_29) {
                           _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&v_29);
                        }
                        goto _fx_endmatch_3;
                     }
                  }
                  _fx_T2R9Ast__id_tN13K_form__dom_t v_45 = {0};
                  _fx_LT2R9Ast__id_tN13K_form__dom_t v_46 = 0;
                  _fx_make_T2R9Ast__id_tN13K_form__dom_t(&nested_i_0, &nested_dom_0, &v_45);
                  FX_CALL(_fx_cons_LT2R9Ast__id_tN13K_form__dom_t(&v_45, new_idl2_1, true, &v_46), _fx_catch_15);
                  _fx_make_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(v_46, pbody2_2,
                     &new_fuse_map_1, &v_27);

               _fx_catch_15: ;
                  if (v_46) {
                     _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&v_46);
                  }
                  _fx_free_T2R9Ast__id_tN13K_form__dom_t(&v_45);

               _fx_endmatch_3: ;
                  FX_CHECK_EXN(_fx_catch_16);
                  _fx_free_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(
                     &__fold_result___4);
                  _fx_copy_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(&v_27,
                     &__fold_result___4);

               _fx_catch_16: ;
                  _fx_free_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(&v_27);
                  _fx_free_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&new_fuse_map_1);
                  if (pbody2_2) {
                     _fx_free_LN14K_form__kexp_t(&pbody2_2);
                  }
                  if (new_idl2_1) {
                     _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&new_idl2_1);
                  }
                  _fx_free_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(&v_26);
                  _fx_free_N13K_form__dom_t(&nested_dom_0);
                  FX_CHECK_EXN(_fx_catch_17);
               }
               _fx_copy_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(&__fold_result___4,
                  &v_23);
               FX_COPY_PTR(v_23.t0, &new_idl2_0);
               FX_COPY_PTR(v_23.t1, &pbody2_0);
               _fx_copy_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&v_23.t2, &new_fuse_map_0);
               FX_CALL(_fx_M6K_formFM12get_kexp_typN14K_form__ktyp_t1N14K_form__kexp_t(arr_body_0, &t_2, 0), _fx_catch_17);
               FX_CALL(_fx_M3AstFM21default_tempval_flagsRM11val_flags_t0(&v_24, 0), _fx_catch_17);
               _fx_M12K_fuse_loopsFM4SomeNt6option1N14K_form__kexp_t1N14K_form__kexp_t(arr_body_0, &v_25);
               FX_CALL(
                  _fx_M6K_formFM14create_kdefvalLN14K_form__kexp_t6R9Ast__id_tN14K_form__ktyp_tR16Ast__val_flags_tNt6option1N14K_form__kexp_tLN14K_form__kexp_tR10Ast__loc_t(
                     &i_1, t_2, &v_24, &v_25, pbody2_0, loc_0, &pbody2_1, 0), _fx_catch_17);
               _fx_make_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(new_idl2_0, pbody2_1,
                  &new_fuse_map_0, &v_19);

            _fx_catch_17: ;
               if (pbody2_1) {
                  _fx_free_LN14K_form__kexp_t(&pbody2_1);
               }
               _fx_free_Nt6option1N14K_form__kexp_t(&v_25);
               _fx_free_R16Ast__val_flags_t(&v_24);
               if (t_2) {
                  _fx_free_N14K_form__ktyp_t(&t_2);
               }
               _fx_free_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&new_fuse_map_0);
               if (pbody2_0) {
                  _fx_free_LN14K_form__kexp_t(&pbody2_0);
               }
               if (new_idl2_0) {
                  _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&new_idl2_0);
               }
               _fx_free_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(&v_23);
               if (arr_idl_0) {
                  _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&arr_idl_0);
               }
               _fx_free_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(&__fold_result___4);
               _fx_free_R24K_fuse_loops__arr_info_t(&v_22);
            }
            else {
               _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_47 = 0;
               _fx_FPi2R9Ast__id_tR9Ast__id_t v_48 = {0};
               _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_49 = 0;
               _fx_T2Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tB v_50 = {0};
               _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t new_root_2 = 0;
               _fx_FPi2R9Ast__id_tR9Ast__id_t v_51 = {0};
               _fx_Rt6Map__t2R9Ast__id_tR9Ast__id_t arr_fuse_map_4 = {0};
               _fx_T2R9Ast__id_tN13K_form__dom_t v_52 = {0};
               _fx_LT2R9Ast__id_tN13K_form__dom_t v_53 = 0;
               FX_COPY_PTR(arr_fuse_map_3.root, &v_47);
               FX_COPY_FP(&arr_fuse_map_3.cmp, &v_48);
               FX_CALL(
                  _fx_M12K_fuse_loopsFM12add_to_tree_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t4Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tFPi2R9Ast__id_tR9Ast__id_t(
                     v_47, arr_1, &i_1, &v_48, &v_49, 0), _fx_catch_19);
               if ((v_49 != 0) + 1 == 2) {
                  _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t*
                     vcase_4 = &v_49->u.Node;
                  if (vcase_4->t0.tag == 1) {
                     _fx_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t v_54 = 0;
                     FX_CALL(
                        _fx_M12K_fuse_loopsFM4NodeNt11Map__tree_t2R9Ast__id_tR9Ast__id_t5N12Map__color_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_tR9Ast__id_tR9Ast__id_tNt11Map__tree_t2R9Ast__id_tR9Ast__id_t(
                           &_fx_g19K_fuse_loops__Black, vcase_4->t1, &vcase_4->t2, &vcase_4->t3, vcase_4->t4, &v_54),
                        _fx_catch_18);
                     _fx_make_T2Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tB(v_54, false, &v_50);

                  _fx_catch_18: ;
                     if (v_54) {
                        _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&v_54);
                     }
                     goto _fx_endmatch_4;
                  }
               }
               _fx_make_T2Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tB(v_49, true, &v_50);

            _fx_endmatch_4: ;
               FX_CHECK_EXN(_fx_catch_19);
               FX_COPY_PTR(v_50.t0, &new_root_2);
               FX_COPY_FP(&arr_fuse_map_3.cmp, &v_51);
               _fx_make_Rt6Map__t2R9Ast__id_tR9Ast__id_t(new_root_2, &v_51, &arr_fuse_map_4);
               _fx_make_T2R9Ast__id_tN13K_form__dom_t(&i_1, &dom_1, &v_52);
               FX_CALL(_fx_cons_LT2R9Ast__id_tN13K_form__dom_t(&v_52, new_idl_1, true, &v_53), _fx_catch_19);
               _fx_make_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(v_53, pbody_1,
                  &arr_fuse_map_4, &v_19);

            _fx_catch_19: ;
               if (v_53) {
                  _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&v_53);
               }
               _fx_free_T2R9Ast__id_tN13K_form__dom_t(&v_52);
               _fx_free_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&arr_fuse_map_4);
               FX_FREE_FP(&v_51);
               if (new_root_2) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&new_root_2);
               }
               _fx_free_T2Nt11Map__tree_t2R9Ast__id_tR9Ast__id_tB(&v_50);
               if (v_49) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&v_49);
               }
               FX_FREE_FP(&v_48);
               if (v_47) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_tR9Ast__id_t(&v_47);
               }
            }
            FX_CHECK_EXN(_fx_catch_20);

         _fx_catch_20: ;
            _fx_free_Nt6option1T2R9Ast__id_trR24K_fuse_loops__arr_info_t(&__fold_result___3);
            _fx_free_Nt6option1T2R9Ast__id_trR24K_fuse_loops__arr_info_t(&__fold_result___2);
            goto _fx_endmatch_5;
         }
      }
      _fx_T2R9Ast__id_tN13K_form__dom_t v_55 = {0};
      _fx_LT2R9Ast__id_tN13K_form__dom_t v_56 = 0;
      _fx_make_T2R9Ast__id_tN13K_form__dom_t(&i_1, &dom_1, &v_55);
      FX_CALL(_fx_cons_LT2R9Ast__id_tN13K_form__dom_t(&v_55, new_idl_1, true, &v_56), _fx_catch_21);
      _fx_make_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(v_56, pbody_1,
         &arr_fuse_map_3, &v_19);

   _fx_catch_21: ;
      if (v_56) {
         _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&v_56);
      }
      _fx_free_T2R9Ast__id_tN13K_form__dom_t(&v_55);

   _fx_endmatch_5: ;
      FX_CHECK_EXN(_fx_catch_22);
      _fx_free_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(&__fold_result___1);
      _fx_copy_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(&v_19, &__fold_result___1);

   _fx_catch_22: ;
      _fx_free_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(&v_19);
      _fx_free_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&arr_fuse_map_3);
      if (pbody_1) {
         _fx_free_LN14K_form__kexp_t(&pbody_1);
      }
      if (new_idl_1) {
         _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&new_idl_1);
      }
      _fx_free_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(&v_18);
      _fx_free_N13K_form__dom_t(&dom_1);
      FX_CHECK_EXN(_fx_cleanup);
   }
   _fx_copy_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(&__fold_result___1, &v_2);
   FX_COPY_PTR(v_2.t0, &new_idl_0);
   FX_COPY_PTR(v_2.t1, &pbody_0);
   FX_CALL(_fx_cons_LN14K_form__kexp_t(body_0, pbody_0, true, &v_3), _fx_cleanup);
   FX_CALL(_fx_M6K_formFM10rcode2kexpN14K_form__kexp_t2LN14K_form__kexp_tR10Ast__loc_t(v_3, loc_0, &new_body_0, 0),
      _fx_cleanup);
   _fx_make_T2LT2R9Ast__id_tN13K_form__dom_tN14K_form__kexp_t(new_idl_0, new_body_0, fx_result);

_fx_cleanup: ;
   FX_FREE_FP(&cmp_id_0);
   _fx_free_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&v_0);
   _fx_free_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t(&__fold_result___0);
   _fx_free_T2Rt6Map__t2R9Ast__id_tR9Ast__id_tLT2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_1);
   _fx_free_Rt6Map__t2R9Ast__id_tR9Ast__id_t(&arr_fuse_map_0);
   if (a2f_0) {
      _fx_free_LT2R9Ast__id_trR24K_fuse_loops__arr_info_t(&a2f_0);
   }
   _fx_free_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(&__fold_result___1);
   _fx_free_T3LT2R9Ast__id_tN13K_form__dom_tLN14K_form__kexp_tRt6Map__t2R9Ast__id_tR9Ast__id_t(&v_2);
   if (new_idl_0) {
      _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&new_idl_0);
   }
   if (pbody_0) {
      _fx_free_LN14K_form__kexp_t(&pbody_0);
   }
   if (v_3) {
      _fx_free_LN14K_form__kexp_t(&v_3);
   }
   if (new_body_0) {
      _fx_free_N14K_form__kexp_t(&new_body_0);
   }
   return fx_status;
}

static int _fx_M12K_fuse_loopsFM10fuse_kexp_N14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t(
   struct _fx_N14K_form__kexp_t_data_t* e_0,
   struct _fx_R17K_form__k_callb_t* callb_0,
   struct _fx_N14K_form__kexp_t_data_t** fx_result,
   void* fx_fv)
{
   _fx_N14K_form__kexp_t e_1 = 0;
   int fx_status = 0;
   _fx_M12K_fuse_loopsFM10fuse_kexp_N14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t_cldata_t* cv_0 =
      (_fx_M12K_fuse_loopsFM10fuse_kexp_N14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t_cldata_t*)fx_fv;
   _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t* arrs_to_fuse_0 = &cv_0->t0;
   FX_CALL(_fx_M6K_formFM9walk_kexpN14K_form__kexp_t2N14K_form__kexp_tRM9k_callb_t(e_0, callb_0, &e_1, 0), _fx_cleanup);
   int tag_0 = FX_REC_VARIANT_TAG(e_1);
   if (tag_0 == 10) {
      _fx_LN14K_form__kexp_t v_0 = 0;
      _fx_T2LN14K_form__kexp_tT2N14K_form__ktyp_tR10Ast__loc_t* vcase_0 = &e_1->u.KExpSeq;
      FX_CALL(_fx_M12K_fuse_loopsFM10fuse_loopsLN14K_form__kexp_t1LN14K_form__kexp_t(vcase_0->t0, &v_0, 0), _fx_catch_0);
      FX_CALL(_fx_M6K_formFM9code2kexpN14K_form__kexp_t2LN14K_form__kexp_tR10Ast__loc_t(v_0, &vcase_0->t1.t1, fx_result, 0),
         _fx_catch_0);

   _fx_catch_0: ;
      if (v_0) {
         _fx_free_LN14K_form__kexp_t(&v_0);
      }
      goto _fx_endmatch_0;
   }
   if (tag_0 == 31) {
      _fx_T3R9Ast__id_tN14K_form__kexp_tR10Ast__loc_t* vcase_1 = &e_1->u.KDefVal;
      _fx_N14K_form__kexp_t v_1 = vcase_1->t1;
      if (FX_REC_VARIANT_TAG(v_1) == 26) {
         _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t*
            vcase_2 = &v_1->u.KExpMap;
         _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t v_2 = vcase_2->t0;
         if (v_2 != 0) {
            if (v_2->tl == 0) {
               _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t v_3 = 0;
               _fx_FPi2R9Ast__id_tR9Ast__id_t v_4 = {0};
               _fx_Nt6option1rR24K_fuse_loops__arr_info_t result_0 = {0};
               _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t t_0 = 0;
               _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_0 = {0};
               _fx_Nt6option1rR24K_fuse_loops__arr_info_t v_5 = {0};
               FX_COPY_PTR(arrs_to_fuse_0->root, &v_3);
               FX_COPY_FP(&arrs_to_fuse_0->cmp, &v_4);
               FX_COPY_PTR(v_3, &t_0);
               _fx_R9Ast__id_t xk_0 = vcase_1->t0;
               FX_COPY_FP(&v_4, &cmp_0);
               for (;;) {
                  _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t t_1 = 0;
                  _fx_FPi2R9Ast__id_tR9Ast__id_t cmp_1 = {0};
                  FX_COPY_PTR(t_0, &t_1);
                  _fx_R9Ast__id_t xk_1 = xk_0;
                  FX_COPY_FP(&cmp_0, &cmp_1);
                  if ((t_1 != 0) + 1 == 2) {
                     _fx_Nt6option1rR24K_fuse_loops__arr_info_t result_1 = {0};
                     _fx_T5N12Map__color_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_tR9Ast__id_trR24K_fuse_loops__arr_info_tNt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t*
                        vcase_3 = &t_1->u.Node;
                     int_ c_0;
                     FX_CALL(cmp_1.fp(&xk_1, &vcase_3->t2, &c_0, cmp_1.fcv), _fx_catch_1);
                     if (c_0 < 0) {
                        _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t* l_0 = &vcase_3->t1;
                        _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&t_0);
                        FX_COPY_PTR(*l_0, &t_0);
                        xk_0 = xk_1;
                        FX_FREE_FP(&cmp_0);
                        FX_COPY_FP(&cmp_1, &cmp_0);
                     }
                     else if (c_0 > 0) {
                        _fx_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t* r_0 = &vcase_3->t4;
                        _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&t_0);
                        FX_COPY_PTR(*r_0, &t_0);
                        xk_0 = xk_1;
                        FX_FREE_FP(&cmp_0);
                        FX_COPY_FP(&cmp_1, &cmp_0);
                     }
                     else {
                        _fx_M12K_fuse_loopsFM4SomeNt6option1rRM10arr_info_t1rRM10arr_info_t(vcase_3->t3, &result_1);
                        _fx_free_Nt6option1rR24K_fuse_loops__arr_info_t(&result_0);
                        _fx_copy_Nt6option1rR24K_fuse_loops__arr_info_t(&result_1, &result_0);
                        FX_BREAK(_fx_catch_1);
                     }

                  _fx_catch_1: ;
                     _fx_free_Nt6option1rR24K_fuse_loops__arr_info_t(&result_1);
                  }
                  else {
                     _fx_free_Nt6option1rR24K_fuse_loops__arr_info_t(&result_0);
                     _fx_copy_Nt6option1rR24K_fuse_loops__arr_info_t(&_fx_g20K_fuse_loops__None1_, &result_0);
                     FX_BREAK(_fx_catch_2);

                  _fx_catch_2: ;
                  }
                  FX_CHECK_EXN(_fx_catch_3);

               _fx_catch_3: ;
                  FX_FREE_FP(&cmp_1);
                  if (t_1) {
                     _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&t_1);
                  }
                  FX_CHECK_BREAK();
                  FX_CHECK_EXN(_fx_catch_5);
               }
               _fx_copy_Nt6option1rR24K_fuse_loops__arr_info_t(&result_0, &v_5);
               if (v_5.tag == 2) {
                  _fx_rR24K_fuse_loops__arr_info_t ainfo_0 = v_5.u.Some;
                  _fx_LT2R9Ast__id_tN13K_form__dom_t* v_6 = &ainfo_0->data.arr_idl;
                  _fx_LT2R9Ast__id_tN13K_form__dom_t* idl_0 = &v_2->hd.t1;
                  _fx_free_LT2R9Ast__id_tN13K_form__dom_t(v_6);
                  FX_COPY_PTR(*idl_0, v_6);
                  _fx_N14K_form__kexp_t* v_7 = &ainfo_0->data.arr_body;
                  _fx_N14K_form__kexp_t* body_0 = &vcase_2->t1;
                  _fx_free_N14K_form__kexp_t(v_7);
                  FX_COPY_PTR(*body_0, v_7);
                  FX_CALL(_fx_M6K_formFM7KExpNopN14K_form__kexp_t1R10Ast__loc_t(&vcase_1->t2, fx_result), _fx_catch_4);

               _fx_catch_4: ;
               }
               else {
                  FX_COPY_PTR(e_1, fx_result);
               }
               FX_CHECK_EXN(_fx_catch_5);

            _fx_catch_5: ;
               _fx_free_Nt6option1rR24K_fuse_loops__arr_info_t(&v_5);
               FX_FREE_FP(&cmp_0);
               if (t_0) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&t_0);
               }
               _fx_free_Nt6option1rR24K_fuse_loops__arr_info_t(&result_0);
               FX_FREE_FP(&v_4);
               if (v_3) {
                  _fx_free_Nt11Map__tree_t2R9Ast__id_trR24K_fuse_loops__arr_info_t(&v_3);
               }
               goto _fx_endmatch_0;
            }
         }
      }
   }
   if (tag_0 == 27) {
      _fx_T5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t* vcase_4 =
         &e_1->u.KExpFor;
      if (vcase_4->t1 == 0) {
         _fx_T2LT2R9Ast__id_tN13K_form__dom_tN14K_form__kexp_t v_8 = {0};
         _fx_LT2R9Ast__id_tN13K_form__dom_t new_idl_0 = 0;
         _fx_N14K_form__kexp_t new_body_0 = 0;
         _fx_LT2R9Ast__id_tN13K_form__dom_t __fold_result___0 = 0;
         _fx_LT2R9Ast__id_tN13K_form__dom_t v_9 = 0;
         _fx_R10Ast__loc_t* loc_0 = &vcase_4->t4;
         FX_CALL(
            _fx_M12K_fuse_loopsFM8fuse_forT2LT2R9Ast__id_tN13K_form__dom_tN14K_form__kexp_t4LT2R9Ast__id_tN13K_form__dom_tN14K_form__kexp_tR10Ast__loc_tRt6Map__t2R9Ast__id_trRM10arr_info_t(
               vcase_4->t0, vcase_4->t2, loc_0, arrs_to_fuse_0, &v_8, 0), _fx_catch_7);
         FX_COPY_PTR(v_8.t0, &new_idl_0);
         FX_COPY_PTR(v_8.t1, &new_body_0);
         _fx_LT2R9Ast__id_tN13K_form__dom_t lst_0 = new_idl_0;
         for (; lst_0; lst_0 = lst_0->tl) {
            _fx_LT2R9Ast__id_tN13K_form__dom_t r_1 = 0;
            _fx_T2R9Ast__id_tN13K_form__dom_t* a_0 = &lst_0->hd;
            FX_COPY_PTR(__fold_result___0, &r_1);
            FX_CALL(_fx_cons_LT2R9Ast__id_tN13K_form__dom_t(a_0, r_1, false, &r_1), _fx_catch_6);
            _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&__fold_result___0);
            FX_COPY_PTR(r_1, &__fold_result___0);

         _fx_catch_6: ;
            if (r_1) {
               _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&r_1);
            }
            FX_CHECK_EXN(_fx_catch_7);
         }
         FX_COPY_PTR(__fold_result___0, &v_9);
         FX_CALL(
            _fx_M6K_formFM7KExpForN14K_form__kexp_t5LT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tR10Ast__loc_t(
               v_9, 0, new_body_0, &vcase_4->t3, loc_0, fx_result), _fx_catch_7);

      _fx_catch_7: ;
         if (v_9) {
            _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&v_9);
         }
         if (__fold_result___0) {
            _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&__fold_result___0);
         }
         if (new_body_0) {
            _fx_free_N14K_form__kexp_t(&new_body_0);
         }
         if (new_idl_0) {
            _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&new_idl_0);
         }
         _fx_free_T2LT2R9Ast__id_tN13K_form__dom_tN14K_form__kexp_t(&v_8);
         goto _fx_endmatch_0;
      }
   }
   if (tag_0 == 26) {
      _fx_T4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t*
         vcase_5 = &e_1->u.KExpMap;
      _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t v_10 = vcase_5->t0;
      if (v_10 != 0) {
         if (v_10->tl == 0) {
            _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t* v_11 = &v_10->hd;
            if (v_11->t2 == 0) {
               _fx_T2LT2R9Ast__id_tN13K_form__dom_tN14K_form__kexp_t v_12 = {0};
               _fx_LT2R9Ast__id_tN13K_form__dom_t new_idl_1 = 0;
               _fx_N14K_form__kexp_t new_body_1 = 0;
               _fx_LT2R9Ast__id_tN13K_form__dom_t __fold_result___1 = 0;
               _fx_LT2R9Ast__id_tN13K_form__dom_t v_13 = 0;
               _fx_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t v_14 = {0};
               _fx_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t v_15 = 0;
               _fx_T2N14K_form__ktyp_tR10Ast__loc_t v_16 = {0};
               _fx_T2N14K_form__ktyp_tR10Ast__loc_t* v_17 = &vcase_5->t3;
               _fx_R10Ast__loc_t* loc_1 = &v_17->t1;
               FX_CALL(
                  _fx_M12K_fuse_loopsFM8fuse_forT2LT2R9Ast__id_tN13K_form__dom_tN14K_form__kexp_t4LT2R9Ast__id_tN13K_form__dom_tN14K_form__kexp_tR10Ast__loc_tRt6Map__t2R9Ast__id_trRM10arr_info_t(
                     v_11->t1, vcase_5->t1, loc_1, arrs_to_fuse_0, &v_12, 0), _fx_catch_9);
               FX_COPY_PTR(v_12.t0, &new_idl_1);
               FX_COPY_PTR(v_12.t1, &new_body_1);
               _fx_LT2R9Ast__id_tN13K_form__dom_t lst_1 = new_idl_1;
               for (; lst_1; lst_1 = lst_1->tl) {
                  _fx_LT2R9Ast__id_tN13K_form__dom_t r_2 = 0;
                  _fx_T2R9Ast__id_tN13K_form__dom_t* a_1 = &lst_1->hd;
                  FX_COPY_PTR(__fold_result___1, &r_2);
                  FX_CALL(_fx_cons_LT2R9Ast__id_tN13K_form__dom_t(a_1, r_2, false, &r_2), _fx_catch_8);
                  _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&__fold_result___1);
                  FX_COPY_PTR(r_2, &__fold_result___1);

               _fx_catch_8: ;
                  if (r_2) {
                     _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&r_2);
                  }
                  FX_CHECK_EXN(_fx_catch_9);
               }
               FX_COPY_PTR(__fold_result___1, &v_13);
               _fx_make_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t(v_11->t0, v_13, 0, &v_14);
               FX_CALL(_fx_cons_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t(&v_14, 0, true, &v_15),
                  _fx_catch_9);
               _fx_make_T2N14K_form__ktyp_tR10Ast__loc_t(v_17->t0, loc_1, &v_16);
               FX_CALL(
                  _fx_M6K_formFM7KExpMapN14K_form__kexp_t4LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_tN14K_form__kexp_tR16Ast__for_flags_tT2N14K_form__ktyp_tR10Ast__loc_t(
                     v_15, new_body_1, &vcase_5->t2, &v_16, fx_result), _fx_catch_9);

            _fx_catch_9: ;
               _fx_free_T2N14K_form__ktyp_tR10Ast__loc_t(&v_16);
               if (v_15) {
                  _fx_free_LT3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t(&v_15);
               }
               _fx_free_T3N14K_form__kexp_tLT2R9Ast__id_tN13K_form__dom_tLR9Ast__id_t(&v_14);
               if (v_13) {
                  _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&v_13);
               }
               if (__fold_result___1) {
                  _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&__fold_result___1);
               }
               if (new_body_1) {
                  _fx_free_N14K_form__kexp_t(&new_body_1);
               }
               if (new_idl_1) {
                  _fx_free_LT2R9Ast__id_tN13K_form__dom_t(&new_idl_1);
               }
               _fx_free_T2LT2R9Ast__id_tN13K_form__dom_tN14K_form__kexp_t(&v_12);
               goto _fx_endmatch_0;
            }
         }
      }
   }
   FX_COPY_PTR(e_1, fx_result);

_fx_endmatch_0: ;

_fx_cleanup: ;
   if (e_1) {
      _fx_free_N14K_form__kexp_t(&e_1);
   }
   return fx_status;
}

FX_EXTERN_C int
   _fx_M12K_fuse_loopsFM7make_fpFPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t1Rt6Map__t2R9Ast__id_trRM10arr_info_t(
   struct _fx_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t* arg0,
   struct _fx_FPN14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t* fx_result)
{
   FX_MAKE_FP_IMPL_START(_fx_M12K_fuse_loopsFM10fuse_kexp_N14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t_cldata_t,
      _fx_free_M12K_fuse_loopsFM10fuse_kexp_N14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t,
      _fx_M12K_fuse_loopsFM10fuse_kexp_N14K_form__kexp_t2N14K_form__kexp_tR17K_form__k_callb_t);
   _fx_copy_Rt6Map__t2R9Ast__id_trR24K_fuse_loops__arr_info_t(arg0, &fcv->t0);
   return 0;
}

FX_EXTERN_C int _fx_M12K_fuse_loopsFM14fuse_loops_allLR17K_form__kmodule_t1LR17K_form__kmodule_t(
   struct _fx_LR17K_form__kmodule_t_data_t* kmods_0,
   struct _fx_LR17K_form__kmodule_t_data_t** fx_result,
   void* fx_fv)
{
   int fx_status = 0;
   _fx_LR17K_form__kmodule_t lstend_0 = 0;
   _fx_LR17K_form__kmodule_t lst_0 = kmods_0;
   for (; lst_0; lst_0 = lst_0->tl) {
      _fx_LN14K_form__kexp_t km_top_0 = 0;
      _fx_LN14K_form__kexp_t new_top_0 = 0;
      _fx_R17K_form__kmodule_t rec_0 = {0};
      _fx_R17K_form__kmodule_t* km_0 = &lst_0->hd;
      FX_COPY_PTR(km_0->km_top, &km_top_0);
      FX_CALL(_fx_M12K_fuse_loopsFM10fuse_loopsLN14K_form__kexp_t1LN14K_form__kexp_t(km_top_0, &new_top_0, 0), _fx_catch_0);
      _fx_make_R17K_form__kmodule_t(&km_0->km_name, km_0->km_idx, km_0->km_toposort_idx, &km_0->km_cname, new_top_0,
         km_0->km_deps, km_0->km_skip, km_0->km_main, &km_0->km_pragmas, &rec_0);
      _fx_LR17K_form__kmodule_t node_0 = 0;
      FX_CALL(_fx_cons_LR17K_form__kmodule_t(&rec_0, 0, false, &node_0), _fx_catch_0);
      FX_LIST_APPEND(*fx_result, lstend_0, node_0);

   _fx_catch_0: ;
      _fx_free_R17K_form__kmodule_t(&rec_0);
      if (new_top_0) {
         _fx_free_LN14K_form__kexp_t(&new_top_0);
      }
      if (km_top_0) {
         _fx_free_LN14K_form__kexp_t(&km_top_0);
      }
      FX_CHECK_EXN(_fx_cleanup);
   }

_fx_cleanup: ;
   return fx_status;
}

FX_EXTERN_C int fx_init_K_fuse_loops(void)
{
   int fx_status = 0;
   return fx_status;
}

FX_EXTERN_C void fx_deinit_K_fuse_loops(void)
{

}

